小修正,如果已存在user,拿已有user资讯取代掉新user资讯来寄送激活码

This commit is contained in:
日下部 詩 2021-02-18 04:02:22 +08:00 committed by GitHub
parent 6f6e184955
commit 633fc30fcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,6 +71,7 @@ func (service *UserRegisterService) Register(c *gin.Context) serializer.Response
expectedUser, err := model.GetUserByEmail(service.UserName)
if expectedUser.Status == model.NotActivicated {
userNotActivated = true
user = expectedUser
} else {
return serializer.DBErr("此邮箱已被使用", err)
}