mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-22 15:22:43 +00:00
added deleted and disabled check for checkToken
This commit is contained in:
1 parent
8bd0326f80
commit
c9bc622f6d
1 file changed
+1
-1
@@ -10,7 +10,7 @@ export function checkToken(token: string, jwtSecret: string): Promise<any> {
|
||||
|
||||
const user = await UserModel.findOne(
|
||||
{ id: decoded.id },
|
||||
{ "user_data.valid_tokens_since": true, bot: true }
|
||||
{ "user_data.valid_tokens_since": true, bot: true, disabled: true, deleted: true }
|
||||
).exec();
|
||||
if (!user) return rej("Invalid Token");
|
||||
// we need to round it to seconds as it saved as seconds in jwt iat and valid_tokens_since is stored in milliseconds
|
||||
|
||||
Reference in new issue
Block a user