mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-18 16:18:04 +00:00
Created friends class
This commit is contained in:
29
RestControllers/friendsController.php
Normal file
29
RestControllers/friendsController.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Friends controller
|
||||
*
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
|
||||
class friendsController{
|
||||
|
||||
/**
|
||||
* Get friends list
|
||||
*
|
||||
* @url POST /friends/getList
|
||||
*/
|
||||
public function getFriendsList(){
|
||||
user_login_required(); //Login required
|
||||
|
||||
//Try to get friends list
|
||||
$friendsList = false;
|
||||
|
||||
//Check for errors
|
||||
if($friendsList === false)
|
||||
Rest_fatal_error(500, "Couldn't get friends list !");
|
||||
|
||||
//Return list
|
||||
return $friendsList;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user