This commit is contained in:
2024-05-19 19:32:55 +02:00
parent c52e92e3ce
commit 617d3b281e

View File

@@ -32,10 +32,11 @@ marbasAxiosInstance.interceptors.response.use(async r => {
let next: string = r.data?.next; let next: string = r.data?.next;
let results = r.data?.results; 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) {
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({ results = results.concat((await marbasAxiosInstance.request({
...r.config, ...r.config,
url: next, url: next,