diff options
-rw-r--r-- | modules/comment/controllers/comments.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/comment/controllers/comments.php b/modules/comment/controllers/comments.php index 8b2e5155..773eb25a 100644 --- a/modules/comment/controllers/comments.php +++ b/modules/comment/controllers/comments.php @@ -49,6 +49,8 @@ class Comments_Controller extends REST_Controller { $comment->item_id = $this->input->post('item_id'); $comment->save(); + module::event("comment_created", $comment); + rest::http_status(rest::CREATED); rest::http_location(url::site("comments/{$comment->id}")); } @@ -97,6 +99,9 @@ class Comments_Controller extends REST_Controller { $comment->email = $this->input->post('email'); $comment->text = $this->input->post('text'); $comment->save(); + + module::event("comment_updated", $comment); + return; } // @todo Return appropriate HTTP status code indicating error. |