1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-11-24 04:31:31 +03:00

refactor: try to use relative urls instead of absolute ones

This commit is contained in:
Sandro Jäckel 2019-05-22 00:46:28 +02:00
parent 7c4403fdaf
commit a3d7a2a735
No known key found for this signature in database
GPG Key ID: 236B6291555E8401
3 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ export default class Client {
})
this.socket.on('download', (data) => {
window.location = `${config.server_host}:${config.server_port}/v1/downloads?package=${data.package}&module=${data.module}`
window.location = `/v1/downloads?package=${data.package}&module=${data.module}`
})
if (this.history !== null) {

View File

@ -21,7 +21,7 @@ document.addEventListener('DOMContentLoaded', () => {
loader.start()
request.get(`${config.server_host}:${config.server_port}/v1/info`)
request.get('/v1/info')
.end((err, res) => {
if (err || !res.ok) {
console.error(err.response.error.message)

View File

@ -21,7 +21,7 @@ socket.on('connect', () => {
console.log('Waiting for hotword...')
})
request.get(`${url}/v1/info`)
request.get('/v1/info')
.end((err, res) => {
if (err || !res.ok) {
if (!err.response) {