optimized api paths
This commit is contained in:
parent
bc0838ef83
commit
49af8440c1
1 changed files with 4 additions and 4 deletions
|
@ -144,7 +144,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadPresets() {
|
loadPresets() {
|
||||||
this.$http.get('/api/deliveryPresets')
|
this.$http.get('api/deliveryPresets')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.presetSearchItems = response.body.map(x => { return {
|
this.presetSearchItems = response.body.map(x => { return {
|
||||||
text: x.name,
|
text: x.name,
|
||||||
|
@ -154,7 +154,7 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
loadConfig() {
|
loadConfig() {
|
||||||
this.$http.get('/config').then(response => {
|
this.$http.get('config').then(response => {
|
||||||
const newConfig = response.body
|
const newConfig = response.body
|
||||||
newConfig.alarms = newConfig.alarms.map((x) => {
|
newConfig.alarms = newConfig.alarms.map((x) => {
|
||||||
x._id = btoa(JSON.stringify(x))
|
x._id = btoa(JSON.stringify(x))
|
||||||
|
@ -170,9 +170,9 @@
|
||||||
delete a._id
|
delete a._id
|
||||||
return a
|
return a
|
||||||
})
|
})
|
||||||
this.$http.post('/config', storeConfig)
|
this.$http.post('config', storeConfig)
|
||||||
.then(response => {})
|
.then(response => {})
|
||||||
.then(this.$http.post('/restart'))
|
.then(this.$http.post('restart'))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
document.body.style = 'display:none'
|
document.body.style = 'display:none'
|
||||||
setTimeout(() => window.location.reload(), 1e3)
|
setTimeout(() => window.location.reload(), 1e3)
|
||||||
|
|
Loading…
Add table
Reference in a new issue