Refactor OTP deletion in UserAuthService

This commit is contained in:
faris Aljohari
2024-03-25 13:36:34 +03:00
parent 2cf45b1703
commit 37316fd9e6

View File

@ -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');
}