Changed behavior of validate
This commit is contained in:
@ -21,14 +21,14 @@ export class TASEClient {
|
|||||||
* @returns A boolean indicating if the current token can be used on TASE's API.
|
* @returns A boolean indicating if the current token can be used on TASE's API.
|
||||||
*/
|
*/
|
||||||
async validate(): Promise<boolean> {
|
async validate(): Promise<boolean> {
|
||||||
const Response = await fetch(TASEApi + `/api/v1/key/validate`, {
|
const Response = await fetch(TASEApi + `/api/v1/auth/validate`, {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Bearer ${this.token}`
|
authorization: `Bearer ${this.token}`
|
||||||
},
|
},
|
||||||
method: "GET"
|
method: "GET"
|
||||||
})
|
})
|
||||||
|
|
||||||
return Response.ok
|
return (await Response.json()).authenticated
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user