Compare commits
3 Commits
9e66471360
...
159473250c
Author | SHA1 | Date | |
---|---|---|---|
159473250c | |||
8318d5c820 | |||
e7e94c16dc |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "npm",
|
"name": "npm",
|
||||||
"version": "1.0.7",
|
"version": "1.1.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "npm",
|
"name": "npm",
|
||||||
"version": "1.0.7",
|
"version": "1.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tsup": "^8.5.0",
|
"tsup": "^8.5.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tase-api",
|
"name": "tase-api",
|
||||||
"version": "1.0.7",
|
"version": "1.1.0",
|
||||||
"description": "The official NPM wrapper for The All Seeing Eye's API",
|
"description": "The official NPM wrapper for The All Seeing Eye's API",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,7 +72,7 @@ export class TASEClient {
|
|||||||
if(UserIDs.length > 10000) throw new Error("The amount of UserIDs must be less than 10,000.")
|
if(UserIDs.length > 10000) throw new Error("The amount of UserIDs must be less than 10,000.")
|
||||||
if(UserIDs.length < 1) throw new Error("The amount of UserIDs must be atleast 1 character.")
|
if(UserIDs.length < 1) throw new Error("The amount of UserIDs must be atleast 1 character.")
|
||||||
|
|
||||||
const Response = await fetch(TASEApi + `/api/v1/mass-check`, {
|
const Response = await fetch(TASEApi + `/api/v1/check/mass`, {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Bearer ${this.token}`,
|
authorization: `Bearer ${this.token}`,
|
||||||
"content-type": "application/json"
|
"content-type": "application/json"
|
||||||
|
Reference in New Issue
Block a user