Files
web_server/backend/handlers/handle_notes.go
2026-01-12 15:46:01 +00:00

20 lines
311 B
Go

package handlers
import (
"net/http"
"github.com/gin-gonic/gin"
)
func (store *Store) GetNote(ctx *gin.Context) {
path := ctx.Param("path")
note, err := store.Notes.GetNote(path)
if err != nil {
ctx.JSON(http.StatusNotFound, gin.H{"error": err.Error()})
return
}
ctx.JSON(http.StatusOK, note)
}