Send a request to create an account on the server

This commit is contained in:
Pierre
2018-04-11 10:52:06 +02:00
parent 99adb1ec0a
commit 7015e10dd3
6 changed files with 127 additions and 1 deletions

View File

@ -0,0 +1,34 @@
/**
* Account interface
*
* @author Pierre HUBERT
*/
ComunicWeb.components.account.interface = {
/**
* Send a request on the server to create an account
*
* @param {string} firstName The first name of the user
* @param {string} lastName The last name of the user
* @param {email} emailAddress The email adress of the user
* @param {password} password The password of the user
* @param {callback} callback The callback function
*/
createAccount: function(firstName, lastName, emailAddress, password, callback){
//Make an API request
var apiURI = "account/create";
var params = {
"firstName": firstName,
"lastName": lastName,
"emailAddress": emailAddress,
"password": password
};
//Perform an API request
ComunicWeb.common.api.makeAPIrequest(apiURI, params, false, callback);
},
}