fix: 验证重复

This commit is contained in:
luchang 2024-03-14 00:10:31 +08:00
parent 4597430f34
commit e2f7ac85b1
1 changed files with 0 additions and 4 deletions

View File

@ -136,10 +136,6 @@ export class UserService {
throw new HttpException('该账户已被注册', HttpStatus.BAD_REQUEST);
}
if (await this.userRepo.findOne({ name: user.name })) {
throw new HttpException('该账户已被注册', HttpStatus.BAD_REQUEST);
}
if (user.email && (await this.userRepo.findOne({ email: user.email }))) {
throw new HttpException('该邮箱已被注册', HttpStatus.BAD_REQUEST);
}