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)
|
if (endpoint === undefined)
|
||||||
return this.api_baseurl;
|
return this.api_baseurl;
|
||||||
|
|
||||||
|
while (endpoint.startsWith('/'))
|
||||||
|
endpoint = endpoint.substring(1);
|
||||||
|
|
||||||
return `${this.api_baseurl}/${endpoint}`;
|
return `${this.api_baseurl}/${endpoint}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,8 +95,6 @@ export class Advent22 {
|
||||||
on_success: (data: number) => void,
|
on_success: (data: number) => void,
|
||||||
): void {
|
): void {
|
||||||
this.api_get<number>(
|
this.api_get<number>(
|
||||||
/**Explodiert Möglicherweise */
|
|
||||||
// oder auch nicht
|
|
||||||
endpoint,
|
endpoint,
|
||||||
(data: number) => {
|
(data: number) => {
|
||||||
on_success(data);
|
on_success(data);
|
||||||
|
|
Loading…
Reference in a new issue