(c *gin.Context)
| 8 | ) |
| 9 | |
| 10 | func CaptchaController(c *gin.Context) { |
| 11 | captchaReq := req.CaptchaReq{} |
| 12 | if err := c.ShouldBind(&captchaReq); err != nil { |
| 13 | resp.ErrorResponse(c, "参数错误") |
| 14 | c.Abort() |
| 15 | return |
| 16 | } |
| 17 | response, err := service.CaptchaService(captchaReq) |
| 18 | if err != nil { |
| 19 | c.Abort() |
| 20 | resp.ReturnErrorResponse(c, response) |
| 21 | return |
| 22 | } |
| 23 | resp.ReturnSuccessResponse(c, response) |
| 24 | } |
nothing calls this directly
no test coverage detected