MCPcopy Create free account
hub / github.com/LeoninCS/DevDesk / Do

Method Do

backend/internal/handler/HttpTestHandler.go:19–37  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

17}
18
19func (h *HttpTestHandler) Do(c *gin.Context) {
20 var req service.HttpTestReq
21 if err := c.ShouldBindJSON(&req); err != nil {
22 c.JSON(http.StatusBadRequest, gin.H{
23 "error": "invalid request: " + err.Error(),
24 })
25 return
26 }
27
28 resp, err := h.svc.Do(&req)
29 if err != nil {
30 c.JSON(http.StatusBadRequest, gin.H{
31 "error": err.Error(),
32 })
33 return
34 }
35
36 c.JSON(http.StatusOK, resp)
37}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected