Skip to content

Commit

Permalink
Resolve instead of reject.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmoy12c committed Sep 8, 2023
1 parent a915046 commit 1bf3687
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/guard/ws.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1bf3687

Please sign in to comment.