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:
parent
7c4403fdaf
commit
a3d7a2a735
@ -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) {
|
||||
|
@ -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)
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user