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