[setup][page.noauth.login] added API/WS instances + defined urls
This commit is contained in:
parent
22130a4b0b
commit
778984239b
|
@ -107,10 +107,7 @@ gs.get.login.func.login = function(){
|
|||
if( errors )
|
||||
return false;
|
||||
|
||||
/* (3) Create API instance */
|
||||
let api = new xhrcd('douscord-srv.xdrm.io');
|
||||
|
||||
/* (4) API bindings */
|
||||
/* (3) API bindings */
|
||||
api.onreceive = function(_response){
|
||||
|
||||
// manage error
|
||||
|
@ -125,7 +122,7 @@ gs.get.login.func.login = function(){
|
|||
|
||||
api.onclose = function(){ return gs.get.router.push('register'); };
|
||||
|
||||
/* (5) API call */
|
||||
/* (4) API call */
|
||||
api.send({
|
||||
path: 'POST /user/token',
|
||||
http_token: encodeURI(`${username}:${password}`)
|
||||
|
|
|
@ -22,6 +22,10 @@ window.auth = new Authentication();
|
|||
window.xhrcd = XHRClientDriver;
|
||||
window.wscd = WebSocketClientDriver;
|
||||
|
||||
/* (4) ClientDriver instances */
|
||||
window.api = new XHRClientDriver('api.douscord.xdrm.io');
|
||||
window.ws = new WebSocketClientDriver('ws.douscord.xdrm.io');
|
||||
|
||||
|
||||
|
||||
/* (2) Global data
|
||||
|
|
Loading…
Reference in New Issue