mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 22:09:29 +00:00
Reduced code length.
This commit is contained in:
parent
b5bb1e32fd
commit
e1724ea49d
@ -48,13 +48,9 @@ class likesController {
|
|||||||
case "post":
|
case "post":
|
||||||
|
|
||||||
//Extract informations
|
//Extract informations
|
||||||
$id = getPostPostID("id");
|
$id = getPostPostIDWithAccess("id");
|
||||||
$componentType = Likes::LIKE_POST;
|
$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;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user