mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-03 19:54:14 +00:00 
			
		
		
		
	New method in interface to optimize requests.
This commit is contained in:
		@@ -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
 | 
			
		||||
	 * 
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user