From 9a743eb72378aee39a5cf6489b52f01c5d510286 Mon Sep 17 00:00:00 2001 From: doqedev Date: Thu, 9 Oct 2025 22:04:49 -0700 Subject: [PATCH] validate function i guess --- src/class.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/class.ts b/src/class.ts index 3a99b39..2738e27 100644 --- a/src/class.ts +++ b/src/class.ts @@ -10,9 +10,20 @@ export class TASEClient { this.token = APIToken } + async validate(): Promise { + const Response = await fetch(TASEApi + `/api/v1/key/validate`, { + headers: { + authorization: `Bearer ${this.token}` + }, + method: "GET" + }) + + return Response.ok + } + async checkUser(UserID: string): Promise { if(UserID.length < 16 || UserID.length > 20) throw new Error("A UserID must be between 16-20 characters.") - + const Response = await fetch(TASEApi + `/api/v1/check/${UserID}`, { headers: { authorization: `Bearer ${this.token}`