refactor🎨 核心业务结构调整
This commit is contained in:
1 parent
408dcc5057
commit
e473f158e8
13 files changed
+406
-761
No files matched your search
@@ -11,11 +11,14 @@ type System struct {
|
||||
}
|
||||
|
||||
func (e System) GenerateCaptchaHandler(c *gin.Context) {
|
||||
e.MakeContext(c)
|
||||
log := e.GetLogger()
|
||||
err := e.MakeContext(c).Errors
|
||||
if err != nil {
|
||||
e.Error(500, err, "服务初始化失败!")
|
||||
return
|
||||
}
|
||||
id, b64s, err := captcha.DriverDigitFunc()
|
||||
if err != nil {
|
||||
log.Errorf("DriverDigitFunc error, %s", err.Error())
|
||||
e.Logger.Errorf("DriverDigitFunc error, %s", err.Error())
|
||||
e.Error(500, err, "验证码获取失败")
|
||||
return
|
||||
}
|
||||
@@ -25,4 +28,4 @@ func (e System) GenerateCaptchaHandler(c *gin.Context) {
|
||||
"id": id,
|
||||
"msg": "success",
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user