Reduced code length.

This commit is contained in:
Pierre 2018-01-15 19:14:34 +01:00
parent b5bb1e32fd
commit e1724ea49d

View File

@ -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;