Merge branch 'master' of gitlab.prodcontest.ru:team-15/project

This commit is contained in:
ITQ
2025-03-01 21:51:15 +03:00
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
VITE_API_ENDPOINT="/api/v1"
+1 -2
View File
@@ -3,8 +3,6 @@ import { getToken, removeToken } from "../token";
const BASE_URL = import.meta.env.VITE_API_ENDPOINT;
console.log(import.meta.env.VITE_API_ENDPOINT);
export class ApiError extends Error {
response: Response;
status: number;
@@ -26,6 +24,7 @@ export const authFetch = ofetch.create({
export const apiFetch = ofetch.create({
baseURL: BASE_URL,
async onRequest({ options }) {
console.log(import.meta.env.VITE_API_ENDPOINT);
options.headers.set("Authorization", "Bearer " + getToken());
},
async onResponseError({ response }) {