Fix code issue

This commit is contained in:
Gucheng Wang
2023-03-06 00:33:26 +08:00
parent 8427d63872
commit 9d55238cef
2 changed files with 5 additions and 5 deletions

View File

@ -86,8 +86,8 @@ func (captcha *AliyunCaptchaProvider) VerifyCaptcha(token, clientSecret string)
}
type captchaResponse struct {
Code string `json:"Code"`
Message string `json:"Message"`
Code int `json:"Code"`
Msg string `json:"Msg"`
}
captchaResp := &captchaResponse{}
@ -96,8 +96,8 @@ func (captcha *AliyunCaptchaProvider) VerifyCaptcha(token, clientSecret string)
return false, err
}
if captchaResp.Code != "100" {
return false, errors.New(captchaResp.Message)
if captchaResp.Code != 100 {
return false, errors.New(captchaResp.Msg)
}
return true, nil