Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/App.vue
Show All 26 Lines | export default { | ||||
axios.get('/api/auth/info?refresh_token=1') | axios.get('/api/auth/info?refresh_token=1') | ||||
.then(response => { | .then(response => { | ||||
this.$root.loginUser(response.data, false) | this.$root.loginUser(response.data, false) | ||||
this.$root.stopLoading() | this.$root.stopLoading() | ||||
this.isLoading = false | this.isLoading = false | ||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
// Release lock on the router-view, otherwise links (e.g. Logout) will not work | // Release lock on the router-view, otherwise links (e.g. Logout) will not work | ||||
// FIXME: This causes dashboard to call /api/auth/info again | |||||
this.isLoading = false | this.isLoading = false | ||||
this.$root.logoutUser(false) | this.$root.logoutUser(false) | ||||
this.$root.errorHandler(error) | this.$root.errorHandler(error) | ||||
}) | }) | ||||
} else { | } else { | ||||
this.$root.stopLoading() | |||||
this.isLoading = false | this.isLoading = false | ||||
} | } | ||||
}, | }, | ||||
methods: { | methods: { | ||||
childMounted() { | childMounted() { | ||||
this.$root.updateBodyClass() | this.$root.updateBodyClass() | ||||
this.getFAQ() | this.getFAQ() | ||||
}, | }, | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |