Skip to content

Commit

Permalink
Try with last method
Browse files Browse the repository at this point in the history
  • Loading branch information
vycius committed Feb 9, 2024
1 parent 6b415d9 commit dddf200
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ class Api {
constructor() {
this.apiBaseUrl = process.env.VITE_ZUVINIMAS_API_BASE_URL ?? '/api';

this.AuthApiAxios = Axios.create({
baseURL: this.apiBaseUrl,
});
this.AuthApiAxios = Axios.create();
this.AuthApiAxios.interceptors.request.use(
(config) => {
const token = cookies.get('token');
Expand All @@ -94,6 +92,7 @@ class Api {
config.headers!.Authorization = 'Bearer ' + token;
if (isFinite(parseInt(profileId))) config.headers!['X-Profile'] = profileId;
}
config.url = this.apiBaseUrl + config.url;
return config;
},
(error) => {
Expand Down

0 comments on commit dddf200

Please sign in to comment.