make login HOST generic

This commit is contained in:
Adrien Marquès 2018-06-09 12:20:45 +02:00
parent 47c90d8737
commit 8bd98484aa
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ gstore.add('URI', document.URL.replace(/^(?:\/\/|[^\/]+)*/, '').split('/').filte
gstore.add('is_local', document.URL.replace(/^https?:\/\/([^\/:]+).*$/, '$1') == 'ptut.com');
/* (4) API instance */
window.api = new APIClient(gstore.get.is_local ? 'http://ptut.com:8080/api/v/1.0/' : 'https://ptut.xdrm.io/api/v/1.0/');
window.api = new APIClient(gstore.get.is_local ? 'http://ptut.com:8080/api/v/1.0/' : `${gstore.get.HOST}/api/v/1.0/`);
/* (5) PopUp instance */
window.popup = new PopUp();