No need for this

This commit is contained in:
Pitu 2019-03-15 07:30:58 +00:00
parent dfaeb1051f
commit a142078f64
1 changed files with 1 additions and 5 deletions

View File

@ -17,20 +17,16 @@ export const mutations = {
},
user(state, payload) {
if (!payload) {
state.user = {};
localStorage.removeItem('lolisafe-user');
state.user = null;
return;
}
localStorage.setItem('lolisafe-user', JSON.stringify(payload));
state.user = payload;
},
token(state, payload) {
if (!payload) {
localStorage.removeItem('lolisafe-token');
state.token = null;
return;
}
localStorage.setItem('lolisafe-token', payload);
setAuthorizationHeader(payload);
state.token = payload;
},