Can request a membership deletion on the API

This commit is contained in:
Pierre HUBERT
2018-07-10 14:48:16 +02:00
parent 59c917f599
commit 1b9ccfc95b
3 changed files with 58 additions and 1 deletions

View File

@ -34,6 +34,21 @@ ComunicWeb.components.groups.interface = {
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
},
/**
* Remove a user membership
*
* @param {Number} groupID The ID of the target group
* @param {Function} callback
*/
removeMembership: function(groupID, callback){
//Perform the request over the API
var apiURI = "groups/remove_membership";
var params = {
id: groupID
};
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
},
/**
* Get information about a group
*