mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 16:47:10 +00:00
feat: something with something
This commit is contained in:
@@ -14,17 +14,16 @@ export class ApiError extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
export const authFetch = ofetch.create({
|
||||
export const apiFetch = ofetch.create({
|
||||
baseURL: BASE_URL,
|
||||
async onResponseError({ response }) {
|
||||
throw new ApiError(response);
|
||||
},
|
||||
});
|
||||
|
||||
export const apiFetch = ofetch.create({
|
||||
export const userFetch = 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 }) {
|
||||
|
||||
Reference in New Issue
Block a user