mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 15:17:41 +00:00
Merge branch 'dev'
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user