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

Method renameNote

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

Source from the content-addressed store, hash-verified

618}
619
620func (s *Server) renameNote(w http.ResponseWriter, r *http.Request) {
621 var req struct {
622 Path string `json:"path"`
623 Title string `json:"title"`
624 }
625 if err := readJSON(r, &req); err != nil {
626 http.Error(w, err.Error(), http.StatusBadRequest)
627 return
628 }
629 meta, err := s.currentVault().RenameNote(req.Path, req.Title)
630 if err != nil {
631 writeError(w, err)
632 return
633 }
634 writeJSON(w, http.StatusOK, meta)
635}
636
637func (s *Server) deleteNote(w http.ResponseWriter, r *http.Request) {
638 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
RenameNoteMethod · 0.80

Tested by

no test coverage detected