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

Method archiveNote

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

Source from the content-addressed store, hash-verified

690}
691
692func (s *Server) archiveNote(w http.ResponseWriter, r *http.Request) {
693 var req struct {
694 Path string `json:"path"`
695 }
696 if err := readJSON(r, &req); err != nil {
697 http.Error(w, err.Error(), http.StatusBadRequest)
698 return
699 }
700 meta, err := s.currentVault().ArchiveNote(req.Path)
701 if err != nil {
702 writeError(w, err)
703 return
704 }
705 writeJSON(w, http.StatusOK, meta)
706}
707
708func (s *Server) unarchiveNote(w http.ResponseWriter, r *http.Request) {
709 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
ArchiveNoteMethod · 0.80

Tested by

no test coverage detected