mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
fix: 登录去掉后端格式校验
This commit is contained in:
parent
9bbad95c04
commit
a195b8b69f
@ -28,10 +28,6 @@ func (b *BaseApi) Login(c *gin.Context) {
|
||||
helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, err)
|
||||
return
|
||||
}
|
||||
if err := global.VALID.Struct(req); err != nil {
|
||||
helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, err)
|
||||
return
|
||||
}
|
||||
if err := captcha.VerifyCode(req.CaptchaID, req.Captcha); err != nil {
|
||||
helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err)
|
||||
return
|
||||
|
@ -18,17 +18,17 @@ type MfaCredential struct {
|
||||
}
|
||||
|
||||
type Login struct {
|
||||
Name string `json:"name" validate:"name,required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Name string `json:"name"`
|
||||
Password string `json:"password"`
|
||||
Captcha string `json:"captcha"`
|
||||
CaptchaID string `json:"captchaID"`
|
||||
AuthMethod string `json:"authMethod"`
|
||||
}
|
||||
|
||||
type MFALogin struct {
|
||||
Name string `json:"name" validate:"name,required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Secret string `json:"secret" validate:"required"`
|
||||
Name string `json:"name"`
|
||||
Password string `json:"password"`
|
||||
Secret string `json:"secret"`
|
||||
Code string `json:"code"`
|
||||
AuthMethod string `json:"authMethod"`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user