bugfix in editCache
This commit is contained in:
parent
16381ac8c2
commit
21d35288db
@ -188,10 +188,10 @@
|
|||||||
},
|
},
|
||||||
saveCache() {
|
saveCache() {
|
||||||
// commit to store, send to api, if success -> reset store
|
// commit to store, send to api, if success -> reset store
|
||||||
|
let cache = JSON.parse(JSON.stringify(this.computedCache));
|
||||||
|
console.log(cache);
|
||||||
|
cache.stationen.push(this.computedEndstation);
|
||||||
if (this.isNewCache) {
|
if (this.isNewCache) {
|
||||||
let cache = JSON.parse(JSON.stringify(this.computedCache));
|
|
||||||
console.log(cache);
|
|
||||||
cache.stationen.push(this.computedEndstation);
|
|
||||||
|
|
||||||
this.$axios.post('/api/createCache', cache)
|
this.$axios.post('/api/createCache', cache)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
@ -222,7 +222,7 @@
|
|||||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {message: msg, title: title,});
|
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {message: msg, title: title,});
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$axios.post('/api/editCache', cache)
|
this.$axios.put('/api/editCache', cache)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log("POST api/editCache: " + response.statusText);
|
console.log("POST api/editCache: " + response.statusText);
|
||||||
this.$store.commit('cacheCollector/RESET_NEW_CACHE');
|
this.$store.commit('cacheCollector/RESET_NEW_CACHE');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user