release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
2 changed files with 18 additions and 1 deletions
Showing only changes of commit bea9f9f5dc - Show all commits

View File

@ -1,5 +1,7 @@
import axios, { AxiosInstance } from 'axios'; import axios, { AxiosInstance } from 'axios';
import { boot } from 'quasar/wrappers'; import { boot } from 'quasar/wrappers';
import { StateInterface } from '../store';
import config from '../config'
declare module 'vue/types/vue' { declare module 'vue/types/vue' {
interface Vue { interface Vue {
@ -7,7 +9,17 @@ declare module 'vue/types/vue' {
} }
} }
export default boot(({ Vue }) => { export default boot(({ Vue, store }) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
Vue.prototype.$axios = axios; Vue.prototype.$axios = axios;
axios.defaults.baseURL = config.baseURL;
axios.interceptors.request.use(
config => {
const token = (<StateInterface>store.state).user.token;
if (token) {
config.headers['Authorization'] = 'Token ' + token.token;
}
return config;
});
}); });

5
src/config.ts Normal file
View File

@ -0,0 +1,5 @@
const config = {
baseURL: "http://flaschengeist.local:5000"
};
export default config;