mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 04:15:17 +00:00
Can respond to membership requests
This commit is contained in:
@ -175,6 +175,23 @@ ComunicWeb.components.groups.interface = {
|
||||
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get information about a single user membership
|
||||
*
|
||||
* @param {Number} userID The ID of the target user
|
||||
* @param {Number} groupID The ID of the target group
|
||||
* @param {Function} callback The result
|
||||
*/
|
||||
getMembership: function(userID, groupID, callback){
|
||||
//Perform the request over the API
|
||||
var apiURI = "groups/get_membership";
|
||||
var params = {
|
||||
groupID: groupID,
|
||||
userID: userID
|
||||
};
|
||||
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove (delete) a member from the group
|
||||
*
|
||||
@ -190,5 +207,23 @@ ComunicWeb.components.groups.interface = {
|
||||
userID: userID
|
||||
};
|
||||
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* Respond to a membership request
|
||||
*
|
||||
* @param {Number} groupID The ID of the target group
|
||||
* @param {Number} userID The ID of the target user
|
||||
* @param {Boolean} accept Specify whether the request is accepted or not
|
||||
*/
|
||||
respondRequest: function(groupID, userID, accept, callback){
|
||||
//Perform the request over the API
|
||||
var apiURI = "groups/respond_request";
|
||||
var params = {
|
||||
groupID: groupID,
|
||||
userID: userID,
|
||||
accept: accept
|
||||
};
|
||||
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user