Test: captcha

This commit is contained in:
HFO4
2019-11-13 18:34:29 +08:00
parent 9660d2f9c1
commit 41e0dec74c
5 changed files with 56 additions and 7 deletions

View File

@@ -26,7 +26,6 @@ func (service *UserLoginService) Login(c *gin.Context) serializer.Response {
// TODO 验证码校验
captchaID := util.GetSession(c, "captchaID")
if captchaID == nil || !base64Captcha.VerifyCaptcha(captchaID.(string), service.CaptchaCode) {
util.DeleteSession(c, "captchaID")
return serializer.ParamErr("验证码错误", nil)
}
}