diff --git a/src/marbas/marbasService.ts b/src/marbas/marbasService.ts index 990d2df..6ef17c1 100644 --- a/src/marbas/marbasService.ts +++ b/src/marbas/marbasService.ts @@ -32,10 +32,11 @@ marbasAxiosInstance.interceptors.response.use(async r => { let next: string = r.data?.next; let results = r.data?.results; - if (!next.startsWith(import.meta.env.VITE_MARBAS_URL)) { // FIME remove once the API is fixed - next = import.meta.env.VITE_MARBAS_URL + next.replace(/http(s)?:\/\/[^/]+\//g, ''); - } if (next) { + if (!next.startsWith(import.meta.env.VITE_MARBAS_URL)) { // FIME remove once the API is fixed + next = import.meta.env.VITE_MARBAS_URL + next.replace(/http(s)?:\/\/[^/]+\//g, ''); + } + results = results.concat((await marbasAxiosInstance.request({ ...r.config, url: next,