updated api hosts

This commit is contained in:
Alexander Popov 2023-08-06 03:55:37 +03:00
parent baa6937bef
commit 856c72ea57

View File

@ -4,8 +4,8 @@ let DEBUG = false;
window.DEBUG = DEBUG; window.DEBUG = DEBUG;
let SERVER_HOST; let SERVER_HOST;
if (DEBUG) SERVER_HOST = 'localhost'; if (DEBUG) SERVER_HOST = 'http://localhost:50009';
else SERVER_HOST = 'a2s.su'; else SERVER_HOST = 'https://a2s.su';
window.SERVER_HOST = SERVER_HOST; window.SERVER_HOST = SERVER_HOST;
/* main */ /* main */
@ -72,7 +72,7 @@ function get_from_api(callback, api_method = '', params = {}) {
if (api_method == '') { if (api_method == '') {
console.log('wrong method'); console.log('wrong method');
} else { } else {
let url = `http://${SERVER_HOST}:50009/api/v1.0/${api_method}`; let url = `${SERVER_HOST}/api/v1.0/${api_method}`;
let opts = { let opts = {
method: 'get', method: 'get',
headers: { headers: {