mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 22:09:21 +00:00
25 lines
432 B
JavaScript
25 lines
432 B
JavaScript
|
/**
|
||
|
* Notifications interface
|
||
|
*
|
||
|
* @author Pierre HUBERT
|
||
|
*/
|
||
|
|
||
|
ComunicWeb.components.notifications.interface = {
|
||
|
|
||
|
/**
|
||
|
* Get the number of unread notifications
|
||
|
*
|
||
|
* @param {function} callback
|
||
|
*/
|
||
|
getNbUnreads: function(callback){
|
||
|
|
||
|
//Perform API request
|
||
|
var apiURI = "notifications/count_unread";
|
||
|
var params = {};
|
||
|
|
||
|
//Perform the request
|
||
|
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|