continue cache works

This commit is contained in:
Timo Volkmann 2019-05-01 21:31:14 +02:00
parent 1f2ee957e8
commit e660a7bba7

View File

@ -271,15 +271,17 @@
}) })
}, },
continueCache(cacheID) { continueCache(cacheID) {
console.log("cacheID") console.log("cacheID");
console.log(cacheID) console.log(cacheID);
let currentCache; let currentStationID;
if (localStorage.getItem('userToken')) { if (localStorage.getItem('userToken')) {
let params = {cacheID: cacheID}; let params = {cacheID: cacheID};
params.token = JSON.parse(localStorage.getItem('userToken')).token; params.token = JSON.parse(localStorage.getItem('userToken')).token;
this.$axios.get('/api/getCurrentStation', {params}) this.$axios.get('/api/getCurrentStation', {params})
.then((response) => { .then((response) => {
console.log(response.data) console.log(response.data);
currentStationID = response.data.aktuelleStation.id;
this.$router.push({path: `/station/${cacheID}/${currentStationID}`});
}) })
.catch((error) => { .catch((error) => {
}); });