added first error dialogs w/o any error specification
This commit is contained in:
parent
deb50cad9c
commit
ddd21915c8
@ -159,9 +159,9 @@
|
||||
console.log("POST api/createCache: " + response.statusText);
|
||||
this.$store.commit('cacheCollector/RESET_NEW_CACHE');
|
||||
this.$router.push({ path: '/overview' });
|
||||
})
|
||||
.catch((error) => {
|
||||
});
|
||||
}).catch((error) => {
|
||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
|
||||
});
|
||||
} else {
|
||||
// TODO update existing Cache
|
||||
}
|
||||
|
||||
@ -117,7 +117,9 @@
|
||||
.then((response) => {
|
||||
console.log("Caches: " + this.caches);
|
||||
this.caches = response.data;
|
||||
})
|
||||
}).catch((error) => {
|
||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
|
||||
})
|
||||
},
|
||||
addCache() {
|
||||
this.$router.push({path: `/cache`})
|
||||
@ -129,7 +131,9 @@
|
||||
this.$axios.delete('/api/deleteCache', {params: {cacheID: id}})
|
||||
.then((response) => {
|
||||
this.fetchAllCaches()
|
||||
})
|
||||
}).catch((error) => {
|
||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
|
||||
})
|
||||
},
|
||||
startCache(cacheID) {
|
||||
const userToken = JSON.parse(localStorage.getItem('userToken')).token;
|
||||
@ -147,7 +151,9 @@
|
||||
console.log(stationID);
|
||||
//this.$router.push({path: `/station/${stationID}`})
|
||||
this.$router.push({path: `/station/${cacheID}/${stationID}`})
|
||||
})
|
||||
}).catch((error) => {
|
||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,7 +127,9 @@
|
||||
this.$axios.get('/api/getMyCaches', { params: {token}} )
|
||||
.then((response) => {
|
||||
this.startedCaches = response.data;
|
||||
});
|
||||
}).catch((error) => {
|
||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
|
||||
});
|
||||
},
|
||||
continueCache(cacheID) {
|
||||
}
|
||||
|
||||
@ -85,8 +85,12 @@
|
||||
const stationView = response.data.find(station => station.id === Number(this.$route.params.id));
|
||||
console.log(JSON.stringify(stationView));
|
||||
this.data.station = stationView;
|
||||
});
|
||||
});
|
||||
}).catch((error) => {
|
||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
|
||||
});
|
||||
}).catch((error) => {
|
||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: error })
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user