Merge branch 'dev'

This commit is contained in:
faris Aljohari
2025-02-05 08:24:25 -06:00

View File

@ -36,10 +36,11 @@ export class UserAuthService {
async signUp(userSignUpDto: UserSignUpDto): Promise<UserEntity> {
const findUser = await this.findUser(userSignUpDto.email);
if (!findUser.isActive) {
throw new BadRequestException('User is not active');
}
if (findUser) {
if (!findUser.isActive) {
throw new BadRequestException('User is not active');
}
throw new BadRequestException('User already registered with given email');
}
const salt = this.helperHashService.randomSalt(10); // Hash the password using bcrypt