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)

View File

@ -1,20 +0,0 @@
package format
import (
"encoding/json"
"text/template"
)
var TemplateFuncMap = template.FuncMap{
"add": func(a, b int) int {
return a + b
},
"json_decode": func(o interface{}) interface{} {
var r []map[string]interface{}
err := json.Unmarshal([]byte(o.(string)), &r)
if err != nil {
panic(err)
}
return r
},
}