add login flow for waiting list demo app

This commit is contained in:
Abdalhamid Alhamad
2025-03-04 14:42:02 +03:00
parent 54ce5b022d
commit 9b5f863577
16 changed files with 184 additions and 21 deletions

View File

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