mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-12-24 13:33:00 +00:00
endpoint slashes
This commit is contained in:
parent
e53619ebcf
commit
cb7c785ef4
1 changed files with 3 additions and 2 deletions
|
@ -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<number>(
|
||||
/**Explodiert Möglicherweise */
|
||||
// oder auch nicht
|
||||
endpoint,
|
||||
(data: number) => {
|
||||
on_success(data);
|
||||
|
|
Loading…
Reference in a new issue