Fixed some TS errors
This commit is contained in:
parent
789cf89603
commit
dc0107bcc9
|
@ -1,6 +1,5 @@
|
||||||
import axios, { AxiosInstance } from 'axios';
|
import axios, { AxiosInstance } from 'axios';
|
||||||
import { boot } from 'quasar/wrappers';
|
import { boot } from 'quasar/wrappers';
|
||||||
import { UserStateInterface } from 'src/plugins/user/store/user';
|
|
||||||
import config from '../config';
|
import config from '../config';
|
||||||
import { Store } from 'vuex';
|
import { Store } from 'vuex';
|
||||||
|
|
||||||
|
@ -16,9 +15,9 @@ export default boot<Store<any>>(({ Vue, store }) => {
|
||||||
axios.defaults.baseURL = config.baseURL;
|
axios.defaults.baseURL = config.baseURL;
|
||||||
|
|
||||||
axios.interceptors.request.use(config => {
|
axios.interceptors.request.use(config => {
|
||||||
const session: Session = store.getters['user/session'];
|
const session: FG.Session = store.getters['user/session'];
|
||||||
if (session) {
|
if (session) {
|
||||||
config.headers['Authorization'] = 'Token ' + session.token;
|
config.headers = {'Authorization': 'Token ' + session.token};
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue