Send a request to the server to create the group

This commit is contained in:
Pierre HUBERT
2018-07-02 08:42:55 +02:00
parent 7ff7bceca3
commit 28cb1e22e7
6 changed files with 197 additions and 25 deletions

View File

@ -0,0 +1,25 @@
/**
* Groups API interface
*
* @author Pierre HUBERT
*/
ComunicWeb.components.groups.interface = {
/**
* Create a group
*
* @param {String} name The name of the group to create
* @param {Function} callback
*/
create: function(name, callback){
//Perform a request over the API
var apiURI = "groups/create";
var params = {
name: name
};
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
}
};