mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-24 06:48:35 +02:00
Better login process
This commit is contained in:
@@ -8,9 +8,9 @@ const _axios = axios.create()
|
||||
_axios.interceptors.request.use(
|
||||
function (config) {
|
||||
const authStore = useAuthStore()
|
||||
// Do something before request is sent
|
||||
if (authStore.isAuthenticated) {
|
||||
config.headers['Accept-Language'] = authStore.authUser.language
|
||||
config.headers['Authorization'] = `Bearer ${authStore.getAccessToken()}`
|
||||
}
|
||||
return config
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user