Fixed broken login redirection when 401 (again)

This commit is contained in:
Eliot Berriot 2019-01-17 11:04:46 +01:00
parent 2b91cc3786
commit be46fb0ea0
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
4 changed files with 40 additions and 23 deletions

View file

@ -97,7 +97,7 @@ axios.interceptors.response.use(function (response) {
error.backendErrors = []
if (error.response.status === 401) {
store.commit('auth/authenticated', false)
logger.default.warn('Received 401 response from API, redirecting to login form')
logger.default.warn('Received 401 response from API, redirecting to login form', router.currentRoute.fullPath)
router.push({name: 'login', query: {next: router.currentRoute.fullPath}})
}
if (error.response.status === 404) {