Check user active status before sign-up and invite

This commit is contained in:
faris Aljohari
2025-02-04 01:56:56 -06:00
parent 5d83555a99
commit a92497603f
2 changed files with 9 additions and 2 deletions

View File

@ -36,6 +36,9 @@ 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) {
throw new BadRequestException('User already registered with given email');
}