From e1724ea49d7cb65787fe68e232c9201c99cb1d53 Mon Sep 17 00:00:00 2001 From: Pierre Date: Mon, 15 Jan 2018 19:14:34 +0100 Subject: [PATCH] Reduced code length. --- RestControllers/likesController.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/RestControllers/likesController.php b/RestControllers/likesController.php index 7c9f501..b02895b 100644 --- a/RestControllers/likesController.php +++ b/RestControllers/likesController.php @@ -48,13 +48,9 @@ class likesController { case "post": //Extract informations - $id = getPostPostID("id"); + $id = getPostPostIDWithAccess("id"); $componentType = Likes::LIKE_POST; - //Check user can see the post - if(CS::get()->components->posts->access_level($id, userID) === Posts::NO_ACCESS) - Rest_fatal_error(401, "You are not allowed to access this post informations !"); - break;