mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-12-25 13:08:58 +00:00
Updated visibility levels
This commit is contained in:
parent
6378dc95ee
commit
9e82720491
@ -9,6 +9,15 @@
|
||||
|
||||
class postsController {
|
||||
|
||||
/**
|
||||
* Visibility levels for the API
|
||||
*/
|
||||
const VISIBILITY_LEVELS_API = array(
|
||||
Posts::VISIBILITY_PUBLIC => "public",
|
||||
Posts::VISIBILITY_FRIENDS => "friends",
|
||||
Posts::VISIBILITY_USER => "private"
|
||||
);
|
||||
|
||||
/**
|
||||
* Access levels for the POST for the api
|
||||
*/
|
||||
@ -52,6 +61,9 @@ class postsController {
|
||||
//Save level access in the response
|
||||
$posts[$num]["user_access"] = $this::ACCESS_LEVEL_API[$access_level];
|
||||
|
||||
//Update visibility level
|
||||
$posts[$num]['visibility_level'] = $this::VISIBILITY_LEVELS_API[$infos['visibility_level']];
|
||||
|
||||
}
|
||||
|
||||
return $posts;
|
||||
|
Loading…
Reference in New Issue
Block a user