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

Method GetDocument

backend/internal/handler/MarkdownHandler.go:28–36  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

26}
27
28func (h *MarkdownHandler) GetDocument(c *gin.Context) {
29 hash := c.Param("hash")
30 doc, ok := h.md.GetDocument(hash)
31 if !ok {
32 c.JSON(http.StatusNotFound, gin.H{"error": service.ErrDocNotFound.Error()})
33 return
34 }
35 c.JSON(http.StatusOK, gin.H{"content": doc.Content})
36}
37
38func (h *MarkdownHandler) UpdateDocument(c *gin.Context) {
39 var req struct {

Callers 1

StreamDocumentMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected