Send group membreship requests to the server.

This commit is contained in:
Pierre HUBERT
2018-07-06 18:48:49 +02:00
parent f90dc5d9ae
commit d32c1428cf
2 changed files with 49 additions and 1 deletions

View File

@ -143,6 +143,21 @@ ComunicWeb.components.groups.interface = {
id: id
};
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
}
},
/**
* Send a request to join a group
*
* @param {Number} id The ID of the target group
* @param {Function} callback
*/
sendRequest: function(id, callback){
//Perform the request over the API
var apiURI = "groups/send_request";
var params = {
id: id
};
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
},
};