mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-19 08:35:18 +00:00
Created get conversations list method
This commit is contained in:
@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user