This commit is contained in:
Jörn-Michael Miehe 2022-11-22 22:27:57 +00:00
parent cae145ea6a
commit a7d9b4a3b5

View file

@ -25,7 +25,7 @@ export class Advent22 {
public api_url(endpoint?: string): string { public api_url(endpoint?: string): string {
if (endpoint === undefined) if (endpoint === undefined)
return `${this.api_baseurl}`; return this.api_baseurl;
return `${this.api_baseurl}/${endpoint}`; return `${this.api_baseurl}/${endpoint}`;
} }
@ -66,6 +66,9 @@ export class Advent22 {
reader.onloadend = () => { reader.onloadend = () => {
if (typeof reader.result === "string") if (typeof reader.result === "string")
on_success(reader.result); on_success(reader.result);
else
this.fail(endpoint);
} }
}, },
"blob", "blob",