Commit 45d55c2c authored by amandazk's avatar amandazk

Corrigindo erro do storage.auth.user

parent 178df4be
......@@ -7,7 +7,7 @@ axios.interceptors.request.use(
const storage = JSON.parse(localStorage.getItem('psIfc'))
if (storage && storage.auth) {
if (storage.auth.loggedIn) {
config.headers.common['Authorization'] = `Bearer ${storage.auth.user.access}`
config.headers.common['Authorization'] = 'Bearer ${storage.auth.user.access}'
}
}
return config
......
......@@ -18,7 +18,6 @@ export const auth = {
actions: {
login({ commit }, user) {
console.log('oi1 ...', user)
return AuthApi.login(user).then( (user) => {
commit('loginSuccess', user)
return Promise.resolve(user)
......@@ -26,7 +25,12 @@ export const auth = {
commit('loginFailure')
return Promise.reject(error)
})
}
},
// logout () {
// localStorage.removeItem('psIfc')
// this.$router.push('/login')
// }
},
mutations: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment