diff --git a/ui/src/plugins/advent22.ts b/ui/src/plugins/advent22.ts index 8cfad6b..e53ac30 100644 --- a/ui/src/plugins/advent22.ts +++ b/ui/src/plugins/advent22.ts @@ -27,6 +27,9 @@ export class Advent22 { if (endpoint === undefined) return this.api_baseurl; + while (endpoint.startsWith('/')) + endpoint = endpoint.substring(1); + return `${this.api_baseurl}/${endpoint}`; } @@ -92,8 +95,6 @@ export class Advent22 { on_success: (data: number) => void, ): void { this.api_get( - /**Explodiert Möglicherweise */ - // oder auch nicht endpoint, (data: number) => { on_success(data);