[NW] IA verification

This commit is contained in:
KillerBossOriginal 2023-12-08 16:21:33 +01:00
parent 0365b3cf2d
commit 84870e7e9e
3 changed files with 6 additions and 2 deletions

View file

@ -22,7 +22,7 @@ export default class CreditsManager {
} }
/** /**
* Sets the ID for the function. * Sets the number of credits for a given user.
* *
* @param {number} id - The ID to set. * @param {number} id - The ID to set.
* @return {Promise<number>} - The credits of the user. * @return {Promise<number>} - The credits of the user.

View file

@ -14,4 +14,8 @@ export default class IAManager {
if (req.status == 404) throw new Error("User not Found"); if (req.status == 404) throw new Error("User not Found");
return req.data; return req.data;
} }
async verify(code: number, identifier: any) {
await axios.post(`${this.URL}/IA/verify/${code}`, { "identifier": "" });
}
} }

View file

@ -45,7 +45,7 @@ export default class TNC extends EventEmitter {
}); });
socket.on("discord_verification", (data) => { socket.on("discord_verification", (data) => {
let d = JSON.parse(JSON.stringify(data)); let d = JSON.parse(JSON.stringify(data));
this.emit("discord_verification", d.id); this.emit("discord_verification", d.id, d.code);
}); });
} }
} }