From 37316fd9e6e3f41ade686d45f1aa6ac552511236 Mon Sep 17 00:00:00 2001 From: faris Aljohari <83524184+farisaljohari@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:36:34 +0300 Subject: [PATCH] Refactor OTP deletion in UserAuthService --- src/auth/services/user-auth.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/services/user-auth.service.ts b/src/auth/services/user-auth.service.ts index ae8c721..6c1e172 100644 --- a/src/auth/services/user-auth.service.ts +++ b/src/auth/services/user-auth.service.ts @@ -135,7 +135,7 @@ export class UserAuthService { } if (otp.expiryTime < new Date()) { - await this.otpRepository.delete(otp.id); + await this.otpRepository.delete(otp.uuid); throw new BadRequestException('OTP expired'); }