refactor: api层尽可能屏蔽gin框架相关代码

This commit is contained in:
meilin.huang
2024-02-24 16:30:29 +08:00
parent 7e7f02b502
commit b56b0187cf
44 changed files with 639 additions and 595 deletions

View File

@@ -13,7 +13,6 @@ import (
"mayfly-go/pkg/cache"
"mayfly-go/pkg/captcha"
"mayfly-go/pkg/errorx"
"mayfly-go/pkg/ginx"
"mayfly-go/pkg/model"
"mayfly-go/pkg/req"
"mayfly-go/pkg/utils/collx"
@@ -40,7 +39,7 @@ func (a *LdapLogin) GetLdapEnabled(rc *req.Ctx) {
// @router /auth/ldap/login [post]
func (a *LdapLogin) Login(rc *req.Ctx) {
loginForm := ginx.BindJsonAndValid(rc.GinCtx, new(form.LoginForm))
loginForm := req.BindJsonAndValid(rc, new(form.LoginForm))
accountLoginSecurity := config.GetAccountLoginSecurity()
// 判断是否有开启登录验证码校验