We should document the restws hooks and give an example for a resource controller class. Patch attached.

CommentFileSizeAuthor
#2 restws-api.patch5.14 KBklausi
restws-api.patch5.17 KBklausi

Comments

fago’s picture

Status: Needs review » Needs work

Oh, yes this is very much missing.

+ catch (Exception $e) {}
+ throw new RestWSException('Creation error', 406);

Wrong parentheses.. ;)

>+ */
+ public function delete($id) {
+ try {
+ rules_invoke_component('mymodule_book_service_delete', $id);
+ return;

Just going with mymodule_book_delete() probably would make more sense for people here?

klausi’s picture

Status: Needs work » Needs review
StatusFileSize
new5.14 KB

Right, let's keep it simple. Fixed that two points.

fago’s picture

Status: Needs review » Reviewed & tested by the community
klausi’s picture

Status: Reviewed & tested by the community » Fixed

And committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.