From 21d35288db80a317e7ec2028dbd4eb691573d53f Mon Sep 17 00:00:00 2001 From: Timo Volkmann Date: Tue, 14 May 2019 10:52:44 +0200 Subject: [PATCH] bugfix in editCache --- frontend/src/pages/Cache.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/Cache.vue b/frontend/src/pages/Cache.vue index d61d98d..0c688b9 100644 --- a/frontend/src/pages/Cache.vue +++ b/frontend/src/pages/Cache.vue @@ -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');