diff --git a/src/client.ts b/src/client.ts index f89234b..7a95e9e 100644 --- a/src/client.ts +++ b/src/client.ts @@ -97,7 +97,7 @@ export class Client { */ async verifyKey(): Promise { try { - const response = await this.#fetch("1.1/verify-key", {}); + const response = await this.#fetch("1.1/verify-key"); return await response.text() == "valid"; } catch { @@ -111,7 +111,7 @@ export class Client { * @param fields The fields describing the query body. * @returns The server response. */ - async #fetch(endpoint: string, fields: Record): Promise { + async #fetch(endpoint: string, fields: Record = {}): Promise { const body = new URLSearchParams({...this.blog.toJSON(), api_key: this.apiKey}); if (this.isTest) body.set("is_test", "1");