⬆️ update checkToken usage

This commit is contained in:
Flam3rboy
2021-06-30 21:58:10 +02:00
parent 8437156fd3
commit b0e7a80f34
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
try {
const { jwtSecret } = Config.get().security;
var decoded = await checkToken(identify.token, jwtSecret); // will throw an error if invalid
var { decoded } = await checkToken(identify.token, jwtSecret); // will throw an error if invalid
} catch (error) {
console.error("invalid token", error);
return this.close(CLOSECODES.Authentication_failed);