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

Method createExcalidraw

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

Source from the content-addressed store, hash-verified

600}
601
602func (s *Server) createExcalidraw(w http.ResponseWriter, r *http.Request) {
603 var req struct {
604 Folder vault.NoteFolder `json:"folder"`
605 Title string `json:"title"`
606 Subpath string `json:"subpath"`
607 }
608 if err := readJSON(r, &req); err != nil {
609 http.Error(w, err.Error(), http.StatusBadRequest)
610 return
611 }
612 meta, err := s.currentVault().CreateExcalidraw(req.Folder, req.Title, req.Subpath)
613 if err != nil {
614 writeError(w, err)
615 return
616 }
617 writeJSON(w, http.StatusOK, meta)
618}
619
620func (s *Server) renameNote(w http.ResponseWriter, r *http.Request) {
621 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
CreateExcalidrawMethod · 0.80

Tested by

no test coverage detected