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