fixed api paths

master
cheetah 2 years ago
parent 0f8e489af5
commit 2da023c018

@ -102,7 +102,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,
@ -112,7 +112,7 @@
})
},
loadConfig() {
this.$http.get('config').then(response => {
this.$http.get(window.location.pathname + 'config').then(response => {
const newConfig = response.body
newConfig.deliveryModes = newConfig.deliveryModes.map((x) => {
x._id = btoa(JSON.stringify(x))
@ -128,9 +128,9 @@
delete x._id
return x
})
this.$http.post('config', storeConfig).then(response => {
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)

Loading…
Cancel
Save