Created get conversations list method

This commit is contained in:
Pierre
2017-06-11 15:09:54 +02:00
parent bba8de04a0
commit 3729b56ff4
2 changed files with 75 additions and 1 deletions

View File

@ -7,6 +7,25 @@
class conversationsController{
/**
* Get the conversations list
*
* @url POST /conversations/getList
*/
public function getConversationsList(){
user_login_required();
//Try to get the list
$conversationsList = CS::get()->components->conversations->getList(userID);
//Check for errors
if($conversationsList === false)
Rest_fatal_error(500, "Couldn't get conversations list !");
//Return results
return $conversationsList;
}
/**
* Create a new conversation
*