mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
v6 update
This commit is contained in:
@ -17,6 +17,12 @@ axios.interceptors.request.use(function (config) {
|
||||
// Pass selected company to header on all requests
|
||||
const companyId = Ls.get('selectedCompany')
|
||||
|
||||
const authToken = Ls.get('auth.token')
|
||||
|
||||
if (authToken) {
|
||||
config.headers.common.Authorization = authToken
|
||||
}
|
||||
|
||||
if (companyId) {
|
||||
config.headers.common['company'] = companyId
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user