mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 04:10:20 +08:00
Fix code issue
This commit is contained in:
@ -86,8 +86,8 @@ func (captcha *AliyunCaptchaProvider) VerifyCaptcha(token, clientSecret string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
type captchaResponse struct {
|
type captchaResponse struct {
|
||||||
Code string `json:"Code"`
|
Code int `json:"Code"`
|
||||||
Message string `json:"Message"`
|
Msg string `json:"Msg"`
|
||||||
}
|
}
|
||||||
captchaResp := &captchaResponse{}
|
captchaResp := &captchaResponse{}
|
||||||
|
|
||||||
@ -96,8 +96,8 @@ func (captcha *AliyunCaptchaProvider) VerifyCaptcha(token, clientSecret string)
|
|||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if captchaResp.Code != "100" {
|
if captchaResp.Code != 100 {
|
||||||
return false, errors.New(captchaResp.Message)
|
return false, errors.New(captchaResp.Msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
return true, nil
|
return true, nil
|
||||||
|
@ -144,7 +144,7 @@ export const CaptchaModal = (props) => {
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
<Button key="cancel" onClick={handleCancel}>{i18next.t("user:Cancel")}</Button>,
|
<Button key="cancel" onClick={handleCancel}>{i18next.t("user:Cancel")}</Button>,
|
||||||
<Button key="ok" disabled={isOkDisabled} onClick={handleOk}>{i18next.t("user:OK")}</Button>,
|
<Button key="ok" disabled={isOkDisabled} type="primary" onClick={handleOk}>{i18next.t("user:OK")}</Button>,
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user