From 8318d5c820b63d8164365ab267fbe4f6e141f324 Mon Sep 17 00:00:00 2001 From: doqedev Date: Thu, 9 Oct 2025 23:41:47 -0700 Subject: [PATCH] Changed behavior of validate --- src/class.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class.ts b/src/class.ts index 4e312c8..b34bf20 100644 --- a/src/class.ts +++ b/src/class.ts @@ -21,14 +21,14 @@ export class TASEClient { * @returns A boolean indicating if the current token can be used on TASE's API. */ async validate(): Promise { - const Response = await fetch(TASEApi + `/api/v1/key/validate`, { + const Response = await fetch(TASEApi + `/api/v1/auth/validate`, { headers: { authorization: `Bearer ${this.token}` }, method: "GET" }) - return Response.ok + return (await Response.json()).authenticated } /**