From cc4ce6e613039e1a36e99b57dcfb245184dad16b Mon Sep 17 00:00:00 2001 From: cheetah Date: Mon, 12 Dec 2022 22:59:50 +0100 Subject: [PATCH] optimized paths --- html/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/html/index.html b/html/index.html index 0a972b3..2f3c8e6 100644 --- a/html/index.html +++ b/html/index.html @@ -144,7 +144,7 @@ }, methods: { loadPresets() { - this.$http.get('api/deliveryPresets') + this.$http.get(window.location.pathname + 'api/deliveryPresets') .then(response => { this.presetSearchItems = response.body.map(x => { return { text: x.name, @@ -154,7 +154,7 @@ }) }, loadConfig() { - this.$http.get('config').then(response => { + this.$http.get(window.location.pathname + 'config').then(response => { const newConfig = response.body newConfig.alarms = newConfig.alarms.map((x) => { x._id = btoa(JSON.stringify(x)) @@ -170,9 +170,9 @@ delete a._id return a }) - this.$http.post('config', storeConfig) + this.$http.post(window.location.pathname + 'config', storeConfig) .then(response => {}) - .then(this.$http.post('restart')) + .then(this.$http.post(window.location.pathname + 'restart')) .then(() => { document.body.style = 'display:none' setTimeout(() => window.location.reload(), 1e3)