refactor: move flow into interceptor
This commit is contained in:
parent
c04a473f9e
commit
b8a9acbaeb
1 changed files with 2 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ import { boot } from 'quasar/wrappers';
|
|||
import { getToken } from 'src/services/keycloak';
|
||||
import { dialog } from 'stores/utils';
|
||||
import useLoader from 'stores/loader';
|
||||
import useFlowStore from 'src/stores/flow';
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
interface ComponentCustomProperties {
|
||||
|
|
@ -32,6 +33,7 @@ function parseError(
|
|||
api.interceptors.request.use(async (config) => {
|
||||
useLoader().show();
|
||||
config.headers.Authorization = `Bearer ${await getToken()}`;
|
||||
config.headers['X-Rtid'] = useFlowStore().rtid;
|
||||
return config;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue