fix(ui): baseUrl hardcoded api path

We now hav multiple api versions for different routers, so we cannot hardcode the `/api/v1` portion of the baseUrl
This commit is contained in:
psychedelicious 2024-03-01 09:37:27 +11:00
parent c074beff7c
commit bbbd18f119

View File

@ -60,7 +60,7 @@ const dynamicBaseQuery: BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryE
(typeof args === 'string' && args.includes('openapi.json'));
const fetchBaseQueryArgs: FetchBaseQueryArgs = {
baseUrl: baseUrl ? `${baseUrl}/api/v1` : `${window.location.href.replace(/\/$/, '')}/api/v1`,
baseUrl: baseUrl || window.location.href.replace(/\/$/, ''),
};
// When fetching the openapi.json, we need to remove circular references from the JSON.