diff --git a/ui/src/plugins/advent22.ts b/ui/src/plugins/advent22.ts index 0ee1087..74d6868 100644 --- a/ui/src/plugins/advent22.ts +++ b/ui/src/plugins/advent22.ts @@ -56,14 +56,14 @@ export class Advent22 { endpoint: string, responseType: ResponseType = "json", ): Promise { - const req_data = { + const req_config = { auth: this.api_auth, responseType: responseType, }; return new Promise((resolve, reject) => { this.axios - .get(this.api_url(endpoint), req_data) + .get(this.api_url(endpoint), req_config) .then((response) => resolve(response.data)) .catch((reason) => { console.error(`Failed to query ${endpoint}: ${reason}`); @@ -95,9 +95,13 @@ export class Advent22 { } public api_put(endpoint: string, data: unknown): Promise { + const req_config = { + auth: this.api_auth, + }; + return new Promise((resolve, reject) => this.axios - .put(this.api_url(endpoint), data) + .put(this.api_url(endpoint), data, req_config) .then(() => resolve()) .catch(reject), );