[page.noauth.register] used API instance

This commit is contained in:
xdrm-brackets 2018-03-27 14:12:01 +02:00
parent 778984239b
commit 4203cc7629
1 changed files with 2 additions and 6 deletions

View File

@ -122,10 +122,7 @@ gs.get.register.func.register = function(){
if( errors ) if( errors )
return false; return false;
/* (3) Create API instance */ /* (3) API bindings */
let api = new xhrcd('douscord-srv.xdrm.io');
/* (4) API bindings */
api.onreceive = function(_response){ api.onreceive = function(_response){
// manage error // manage error
@ -140,12 +137,11 @@ gs.get.register.func.register = function(){
api.onclose = function(){ return gs.get.router.push('register'); }; api.onclose = function(){ return gs.get.router.push('register'); };
/* (5) API call */ /* (4) API call */
api.send({ api.send({
path: 'POST /user', path: 'POST /user',
form: { form: {
username: username, username: username,
mail: mail,
password: password password: password
} }
}); });