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

Method NewDocument

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

Source from the content-addressed store, hash-verified

17}
18
19func (h *MarkdownHandler) NewDocument(c *gin.Context) {
20 doc, err := h.md.NewDocument()
21 if err != nil {
22 c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
23 return
24 }
25 c.JSON(http.StatusOK, gin.H{"hash": doc.Hash})
26}
27
28func (h *MarkdownHandler) GetDocument(c *gin.Context) {
29 hash := c.Param("hash")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected