cleanup + fix feed

This commit is contained in:
Yusur 2025-09-17 14:00:59 +02:00
parent 244f7e40ce
commit a13c7cbc22
5 changed files with 18 additions and 14 deletions

View file

@ -48,8 +48,7 @@ export class Backend {
}
async fetch(url: string, options?: RequestInit) {
console.info(`fetch ${Backend.ENDPOINT_BASE}/${encodeURIComponent(url)}`)
return await fetch(`${Backend.ENDPOINT_BASE}/${encodeURIComponent(url)}`, options);
return await fetch(`${Backend.ENDPOINT_BASE}/${url.replace(/^\/+/, '')}`, options);
}
withEvent(event: any) {
@ -76,6 +75,7 @@ class EventBackend extends Backend {
}
async fetch(url: string, options?: RequestInit): Promise<Response> {
console.debug(`fetch ${Backend.ENDPOINT_BASE}/${url.replace(/^\/+/, '')}`);
return await this.event.fetch(`${Backend.ENDPOINT_BASE}/${url.replace(/^\/+/, '')}`, options);
}
}