mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
Merge branches 'main' and 'main' of https://bitbucket.org/studiotem/jandl-taskmanager-app
This commit is contained in:
commit
33dfb2bd6f
13 files changed
+80
-61
No files matched your search
@@ -18,6 +18,8 @@ export default {
|
||||
state.user = data.user
|
||||
localStorage.setItem('wzo_vue_user_user', JSON.stringify(data.user))
|
||||
}
|
||||
|
||||
console.log(state)
|
||||
},
|
||||
auth_error(state: any) {
|
||||
state.token = ''
|
||||
@@ -158,7 +160,7 @@ export default {
|
||||
return state.user
|
||||
},
|
||||
token: (state: any) => {
|
||||
return state.token
|
||||
return (state.token && state.token != undefined) ? state.token : null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,6 +149,10 @@ export default {
|
||||
_config(config: any) {
|
||||
if (config) console.error('NOT IMPLEMENTED')
|
||||
|
||||
if (!store.getters['auth/token']) {
|
||||
return {headers: {}}
|
||||
}
|
||||
|
||||
return {
|
||||
headers: {
|
||||
Authorization: `Bearer ${store.getters['auth/token']}`
|
||||
|
||||
Reference in new issue
Block a user