mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
fix hot bugs.
This commit is contained in:
@@ -5,12 +5,15 @@ const http = axios.create();
|
||||
|
||||
http.interceptors.request.use((request) => {
|
||||
const state = store.getState();
|
||||
const token = state.authentication.token;
|
||||
const { token, organization } = state.authentication;
|
||||
const locale = 'en';
|
||||
|
||||
if (token) {
|
||||
request.headers.common['x-access-token'] = token;
|
||||
}
|
||||
if (organization) {
|
||||
request.headers.common['organization-id'] = organization;
|
||||
}
|
||||
if (locale) {
|
||||
request.headers.common['Accept-Language'] = locale;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user