mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-29 15:26:27 +00:00
New method in interface to optimize requests.
This commit is contained in:
parent
a3223a190d
commit
65fe5f9736
@ -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
|
* Get the list of unread notifications
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user