New method in interface to optimize requests.

This commit is contained in:
Pierre 2018-02-21 16:20:52 +01:00
parent a3223a190d
commit 65fe5f9736

View File

@ -22,6 +22,22 @@ ComunicWeb.components.notifications.interface = {
},
/**
* Get the number of unread news such as notifications or conversations
*
* @param {function} callback
*/
getAllUnread: function(callback){
//Perform API request
var apiURI = "notifications/count_all_news";
var params = {};
//Perform the request
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
}
/**
* Get the list of unread notifications
*