mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 22:09:29 +00:00
Notifications deleted on posts deletion.
This commit is contained in:
parent
4d28019ef0
commit
c31c9488db
@ -431,10 +431,11 @@ class postsController {
|
|||||||
if(!CS::get()->components->posts->delete($postID))
|
if(!CS::get()->components->posts->delete($postID))
|
||||||
Rest_fatal_error(500, "Couldn't delete post!");
|
Rest_fatal_error(500, "Couldn't delete post!");
|
||||||
|
|
||||||
/*//Delete related notifications
|
//Delete related notifications
|
||||||
$notification = new Notification();
|
$notification = new Notification();
|
||||||
$notification->set_on_elem_type(Notification::POST);
|
$notification->set_on_elem_type(Notification::POST);
|
||||||
$notification->set_on_elem_id($postID);*/
|
$notification->set_on_elem_id($postID);
|
||||||
|
components()->notifications->delete($notification);
|
||||||
|
|
||||||
//Success
|
//Success
|
||||||
return array("success" => "The post has been deleted!");
|
return array("success" => "The post has been deleted!");
|
||||||
|
Loading…
Reference in New Issue
Block a user