Merge branch 'frontend/timo' into develop

This commit is contained in:
Timo Volkmann 2019-05-14 10:53:18 +02:00
commit 4ae3a410fa

View File

@ -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');