mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-24 17:11:43 +00:00
clear local storage when logging out.
This commit is contained in:
parent
25490e629b
commit
5e12795b0c
1 changed files with 2 additions and 2 deletions
|
|
@ -30,6 +30,8 @@ const actions = {
|
||||||
context.commit('user', user)
|
context.commit('user', user)
|
||||||
},
|
},
|
||||||
logout(context) {
|
logout(context) {
|
||||||
|
axios.defaults.headers.common['authorization'] = "";
|
||||||
|
localStorage.clear()
|
||||||
context.commit('logout');
|
context.commit('logout');
|
||||||
},
|
},
|
||||||
changeStatus(context, status) {
|
changeStatus(context, status) {
|
||||||
|
|
@ -66,8 +68,6 @@ const mutations = {
|
||||||
state.token = token
|
state.token = token
|
||||||
},
|
},
|
||||||
logout(state) {
|
logout(state) {
|
||||||
axios.defaults.headers.common['authorization'] = "";
|
|
||||||
localStorage.removeItem('hauthid')
|
|
||||||
state.user = null,
|
state.user = null,
|
||||||
state.token = null;
|
state.token = null;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue