chore: add docker file for build

This commit is contained in:
mahyargdz
2025-01-22 10:34:52 +03:30
parent 72b6cb35a0
commit c48ec70638
8 changed files with 86 additions and 21 deletions
+9 -2
View File
@@ -1,12 +1,12 @@
import { BadRequestException, Injectable, Logger } from "@nestjs/common";
import { TokensService } from "./tokens.service";
import { AuthMessage, UserMessage } from "../../../common/enums/message.enum";
import { AuthMessage, CommonMessage, UserMessage } from "../../../common/enums/message.enum";
import { UsersService } from "../../users/providers/users.service";
import { OTPService } from "../../utils/providers/otp.service";
import { PasswordService } from "../../utils/providers/password.service";
import { CompleteRegistrationDto } from "../DTO/complete-register.dto";
import { LoginPasswordDTO } from "../DTO/loginPassword.dto";
import { CheckUserExistDto, LoginPasswordDTO } from "../DTO/loginPassword.dto";
import { RequestOtpDto } from "../DTO/request-otp.dto";
import { VerifyOtpDto } from "../DTO/verify-otp.dto";
@@ -77,6 +77,13 @@ export class AuthService {
...tokens,
};
}
//****************** */
async checkUserExist(checkUserExistDto: CheckUserExistDto) {
const user = await this.usersService.findOneWithEmail(checkUserExistDto.email);
if (!user) throw new BadRequestException(UserMessage.USER_NOT_FOUND);
return { message: CommonMessage.USER_EXIST };
}
//****************** */