MCPcopy Index your code
hub / github.com/ZenNotes/zennotes / trashNote

Method trashNote

apps/server/internal/httpserver/server.go:652–666  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

650}
651
652func (s *Server) trashNote(w http.ResponseWriter, r *http.Request) {
653 var req struct {
654 Path string `json:"path"`
655 }
656 if err := readJSON(r, &req); err != nil {
657 http.Error(w, err.Error(), http.StatusBadRequest)
658 return
659 }
660 meta, err := s.currentVault().MoveToTrash(req.Path)
661 if err != nil {
662 writeError(w, err)
663 return
664 }
665 writeJSON(w, http.StatusOK, meta)
666}
667
668func (s *Server) restoreNote(w http.ResponseWriter, r *http.Request) {
669 var req struct {

Callers

nothing calls this directly

Calls 6

currentVaultMethod · 0.95
readJSONFunction · 0.85
writeErrorFunction · 0.85
writeJSONFunction · 0.85
ErrorMethod · 0.80
MoveToTrashMethod · 0.80

Tested by

no test coverage detected