This commit is contained in:
eson
2023-11-15 12:30:39 +08:00
parent 00be6206a9
commit 4018826abe
2 changed files with 4 additions and 24 deletions

View File

@@ -45,10 +45,10 @@ func (l *UserRegisterLogic) UserRegister(req *types.RequestUserRegister, userinf
return resp.SetStatusWithMessage(basic.CodeOAuthEmailErr, "email len must < 50")
}
// _, err := l.svcCtx.AllModels.FsUser.FindUserByEmail(l.ctx, req.Email)
// if err == nil {
// return resp.SetStatus(basic.CodeEmailExistsErr)
// }
_, err := l.svcCtx.AllModels.FsUser.FindUserByEmail(l.ctx, req.Email)
if err == nil {
return resp.SetStatus(basic.CodeEmailExistsErr)
}
if !TimeLimit.Is(req.Email) {
return resp.SetStatus(basic.CodeEmailTimeShortErr)