Can cancel groups membership invitations.

This commit is contained in:
Pierre HUBERT
2018-07-09 15:57:51 +02:00
parent d541506820
commit 1d88b8ea69
2 changed files with 53 additions and 2 deletions

View File

@ -225,5 +225,22 @@ ComunicWeb.components.groups.interface = {
accept: accept
};
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
}
},
/**
* Cancel a membership invitation
*
* @param {Number} groupID The ID of the target group
* @param {Number} userID The ID of the target user
* @param {Function} callback
*/
cancelInvitation: function(groupID, userID, callback){
//Perform the request over the API
var apiURI = "groups/cancel_invitation";
var params = {
groupID: groupID,
userID: userID
};
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
},
};