mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 16:44:54 +00:00
add login flow for waiting list demo app
This commit is contained in:
@ -35,11 +35,16 @@ export class OtpService {
|
||||
|
||||
if (!otp) {
|
||||
this.logger.error(
|
||||
`OTP value ${verifyOtpRequest.value} not found for ${verifyOtpRequest.userId} and ${verifyOtpRequest.otpType}`,
|
||||
`OTP value ${verifyOtpRequest.value} not found for ${verifyOtpRequest.userId} and ${verifyOtpRequest.otpType} or used`,
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
const { affected } = await this.otpRepository.updateOtp(otp.id, { isUsed: true });
|
||||
console.log('+++++++++++++++++++++++++++');
|
||||
console.log(affected);
|
||||
this.logger.log(`OTP verified successfully for ${verifyOtpRequest.userId}`);
|
||||
|
||||
return !!otp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user