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

Method createFolder

apps/server/internal/httpserver/server.go:760–774  ·  view source on GitHub ↗

--- Folders ---

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

758// --- Folders ---
759
760func (s *Server) createFolder(w http.ResponseWriter, r *http.Request) {
761 var req struct {
762 Folder vault.NoteFolder `json:"folder"`
763 Subpath string `json:"subpath"`
764 }
765 if err := readJSON(r, &req); err != nil {
766 http.Error(w, err.Error(), http.StatusBadRequest)
767 return
768 }
769 if err := s.currentVault().CreateFolder(req.Folder, req.Subpath); err != nil {
770 writeError(w, err)
771 return
772 }
773 w.WriteHeader(http.StatusNoContent)
774}
775
776func (s *Server) renameFolder(w http.ResponseWriter, r *http.Request) {
777 var req struct {

Callers

nothing calls this directly

Calls 5

currentVaultMethod · 0.95
readJSONFunction · 0.85
writeErrorFunction · 0.85
ErrorMethod · 0.80
CreateFolderMethod · 0.80

Tested by

no test coverage detected