From 036a6eb725237f8a426f7aa3d741ad7fab810a57 Mon Sep 17 00:00:00 2001 From: alexeh Date: Sat, 19 Oct 2024 06:46:25 +0200 Subject: [PATCH] fix bug missing id in payload --- api/src/modules/auth/strategies/email-update.strategy.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/src/modules/auth/strategies/email-update.strategy.ts b/api/src/modules/auth/strategies/email-update.strategy.ts index 57cec46d..51eb4f23 100644 --- a/api/src/modules/auth/strategies/email-update.strategy.ts +++ b/api/src/modules/auth/strategies/email-update.strategy.ts @@ -4,7 +4,6 @@ import { ExtractJwt, Strategy } from 'passport-jwt'; import { UsersService } from '@api/modules/users/users.service'; import { ApiConfigService } from '@api/modules/config/app-config.service'; import { TOKEN_TYPE_ENUM } from '@shared/schemas/auth/token-type.schema'; -import { Request } from 'express'; export type JwtPayload = { id: string }; @@ -28,7 +27,7 @@ export class EmailConfirmationJwtStrategy extends PassportStrategy( }); } - async validate(req: Request, payload: JwtPayload) { + async validate(payload: JwtPayload) { const { id } = payload; const user = await this.userService.findOneBy(id); if (!user) {