components->user->userAllowed(userID, $id)) Rest_fatal_error(401, "You can not access this user information !"); break; //In case of post case "post": //Extract informations $id = getPostPostIDWithAccess("id"); $componentType = Likes::LIKE_POST; break; //Default case : error default: Rest_fatal_error(404, "Specifed component type currently not supported !"); } //Update like status CS::get()->components->likes->update(userID, $like, $id, $componentType); //Success return array("success" => "Like status updated."); } }