From 502603d37016fd5856549fcbc3ef65797dd1c550 Mon Sep 17 00:00:00 2001 From: mit-27 Date: Mon, 29 Apr 2024 00:52:27 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Fix=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/api/src/@core/auth/guards/jwt-auth.guard.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/api/src/@core/auth/guards/jwt-auth.guard.ts b/packages/api/src/@core/auth/guards/jwt-auth.guard.ts index b70b77e5e..6551ed942 100644 --- a/packages/api/src/@core/auth/guards/jwt-auth.guard.ts +++ b/packages/api/src/@core/auth/guards/jwt-auth.guard.ts @@ -4,17 +4,16 @@ import { UnauthorizedException, } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; +import { Observable } from 'rxjs'; @Injectable() export class JwtAuthGuard extends AuthGuard('jwt') { - canActivate(context: ExecutionContext) { - // Add your custom authentication logic here - // for example, call super.logIn(request) to establish a session. + + canActivate(context: ExecutionContext): boolean | Promise | Observable { return super.canActivate(context); } - handleRequest(err, user, info) { - // You can throw an exception based on either "info" or "err" arguments + handleRequest(err: any, user: any, info: any, context: ExecutionContext, status?: any): TUser { if (err || !user) { throw err || new UnauthorizedException(); }