mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 04:15:17 +00:00
Send a request to the server to create the group
This commit is contained in:
25
assets/js/components/groups/interface.js
Normal file
25
assets/js/components/groups/interface.js
Normal 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);
|
||||
}
|
||||
|
||||
};
|
Reference in New Issue
Block a user