Compare commits
2 Commits
d82f6b6965
...
a9e981baa0
| Author | SHA1 | Date | |
|---|---|---|---|
| a9e981baa0 | |||
| 8fdcc75826 |
@@ -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 = import.meta.env.VITE_MARBAS_URL + next.replace(/http(s)?:\/\/[^/]+/g, '');
|
||||
}
|
||||
if (next) {
|
||||
results = results.concat((await marbasAxiosInstance.request({
|
||||
...r.config,
|
||||
|
||||
Reference in New Issue
Block a user