From 8fdcc75826e29e15b8c7cc6d40c48220ff07bac2 Mon Sep 17 00:00:00 2001 From: Sirttas Date: Sun, 19 May 2024 19:08:22 +0200 Subject: [PATCH] hix https --- src/marbas/marbasService.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/marbas/marbasService.ts b/src/marbas/marbasService.ts index 5a13473..2f73b82 100644 --- a/src/marbas/marbasService.ts +++ b/src/marbas/marbasService.ts @@ -29,9 +29,12 @@ marbasAxiosInstance.interceptors.request.use(r => { }) logResource(marbasAxiosInstance) marbasAxiosInstance.interceptors.response.use(async r => { - const next = r.data?.next; + 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 = next.replace(/http(s)?:\/\/[^\/]+/g, ''); + } if (next) { results = results.concat((await marbasAxiosInstance.request({ ...r.config,