forked from Yara724/api
YARA-695
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
BadRequestException,
|
||||||
HttpException,
|
HttpException,
|
||||||
HttpStatus,
|
HttpStatus,
|
||||||
Injectable,
|
Injectable,
|
||||||
@@ -96,6 +97,7 @@ export class UserAuthService {
|
|||||||
return new LoginDtoRs(newUser);
|
return new LoginDtoRs(newUser);
|
||||||
}
|
}
|
||||||
if (userExist) {
|
if (userExist) {
|
||||||
|
if (userExist.otpExpire > new Date(new Date().getTime()).getTime()) throw new BadRequestException("Wait for expiry time to finish");
|
||||||
await this.smsSender(otp, mobile);
|
await this.smsSender(otp, mobile);
|
||||||
const updateTokens = await this.userDbService.findOneAndUpdate(
|
const updateTokens = await this.userDbService.findOneAndUpdate(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user