MCPcopy Create free account
hub / github.com/danmuking/DiTing-Go / CaptchaController

Function CaptchaController

controller/captcha_controller.go:10–24  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

8)
9
10func 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}

Callers

nothing calls this directly

Calls 4

ErrorResponseFunction · 0.92
CaptchaServiceFunction · 0.92
ReturnErrorResponseFunction · 0.92
ReturnSuccessResponseFunction · 0.92

Tested by

no test coverage detected