diff --git a/frontend/app/common/api.ts b/frontend/app/common/api.ts index 35d010aa..05e92381 100644 --- a/frontend/app/common/api.ts +++ b/frontend/app/common/api.ts @@ -1,10 +1,7 @@ import { siteId, url } from './settings'; import { BASE_URL, API_BASE } from './constants'; import { Config, Comment, Tree, User, BlockedUser, Sorting, AuthProvider, BlockTTL, Image } from './types'; -import createFetcher, { apiFetcher } from './fetcher'; - -const authFetcher = createFetcher(`${BASE_URL}/auth`); -const adminFetcher = createFetcher(`${BASE_URL}${API_BASE}/admin`); +import { authFetcher, apiFetcher, adminFetcher } from './fetcher'; /* Auth methods */ const FROM_URL = `${window.location.origin}${window.location.pathname}?selfClose`; diff --git a/frontend/app/common/fetcher.ts b/frontend/app/common/fetcher.ts index 0b9c3610..71bc9aca 100644 --- a/frontend/app/common/fetcher.ts +++ b/frontend/app/common/fetcher.ts @@ -116,4 +116,5 @@ const createFetcher = (baseUrl: string = ''): Methods => { }; export const apiFetcher = createFetcher(`${BASE_URL}${API_BASE}`); -export default createFetcher; +export const authFetcher = createFetcher(`${BASE_URL}/auth`); +export const adminFetcher = createFetcher(`${BASE_URL}${API_BASE}/admin`);