From 1bf3687f0cf45f933a5dd6fdd7dcd2699184c6bc Mon Sep 17 00:00:00 2001 From: Chinmoy Chakraborty Date: Fri, 8 Sep 2023 17:57:29 +0530 Subject: [PATCH] Resolve instead of reject. --- src/guard/ws.guard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guard/ws.guard.ts b/src/guard/ws.guard.ts index bb5d19b..0db087e 100644 --- a/src/guard/ws.guard.ts +++ b/src/guard/ws.guard.ts @@ -37,7 +37,7 @@ export class WsGuard implements CanActivate { return new Promise(function (resolve, reject) { jwt.verify(bearerToken, getKey, function (err, decoded) { if (err || !decoded || !decoded['sub'] || !decoded['preferred_username']) { - reject('User could not be resolved!'); + resolve('User could not be resolved!'); return; } console.log(decoded);