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

Method Get

backend/internal/handler/CodeShareHandler.go:55–67  ·  view source on GitHub ↗

GET /codeshare/code/:hash

(c *gin.Context)

Source from the content-addressed store, hash-verified

53
54// GET /codeshare/code/:hash
55func (h *CodeShareHandler) Get(c *gin.Context) {
56 hash := c.Param("hash")
57
58 code, ok := h.cs.Get(hash)
59 if !ok {
60 c.JSON(http.StatusNotFound, gin.H{
61 "error": "Code not found or expired",
62 })
63 return
64 }
65
66 c.JSON(http.StatusOK, code)
67}

Callers 1

NewHandlerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected