(c *gin.Context)
| 17 | } |
| 18 | |
| 19 | func (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 | |
| 28 | func (h *MarkdownHandler) GetDocument(c *gin.Context) { |
| 29 | hash := c.Param("hash") |
nothing calls this directly
no outgoing calls
no test coverage detected