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

Method duplicateNote

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

Source from the content-addressed store, hash-verified

722}
723
724func (s *Server) duplicateNote(w http.ResponseWriter, r *http.Request) {
725 var req struct {
726 Path string `json:"path"`
727 }
728 if err := readJSON(r, &req); err != nil {
729 http.Error(w, err.Error(), http.StatusBadRequest)
730 return
731 }
732 meta, err := s.currentVault().DuplicateNote(req.Path)
733 if err != nil {
734 writeError(w, err)
735 return
736 }
737 writeJSON(w, http.StatusOK, meta)
738}
739
740func (s *Server) moveNote(w http.ResponseWriter, r *http.Request) {
741 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
DuplicateNoteMethod · 0.80

Tested by

no test coverage detected