mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-13 19:42:01 +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)
|
||||
},
|
||||
logout(context) {
|
||||
axios.defaults.headers.common['authorization'] = "";
|
||||
localStorage.clear()
|
||||
context.commit('logout');
|
||||
},
|
||||
changeStatus(context, status) {
|
||||
|
|
@ -66,8 +68,6 @@ const mutations = {
|
|||
state.token = token
|
||||
},
|
||||
logout(state) {
|
||||
axios.defaults.headers.common['authorization'] = "";
|
||||
localStorage.removeItem('hauthid')
|
||||
state.user = null,
|
||||
state.token = null;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue