Merge pull request #262 from Hello-job/main

fix: 验证重复
pull/266/head
fantasticit 2024-03-18 09:27:03 +08:00 committed by GitHub
commit 0e21b58cbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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);
}