Fix logout function not redirecting to login form

This commit is contained in:
Bubka 2020-02-28 14:55:14 +01:00
parent b40fc65120
commit 9dcb8e0da9

View File

@ -33,13 +33,12 @@
await this.axios.get('api/logout')
localStorage.removeItem('jwt');
localStorage.removeItem('user');
localStorage.removeItem('jwt')
localStorage.removeItem('user')
delete this.axios.defaults.headers.common['Authorization'];
this.$router.go('/login');
delete this.axios.defaults.headers.common['Authorization']
this.$router.push({ name: 'login' })
}
},