(w http.ResponseWriter, r *http.Request)
| 722 | } |
| 723 | |
| 724 | func (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 | |
| 740 | func (s *Server) moveNote(w http.ResponseWriter, r *http.Request) { |
| 741 | var req struct { |
nothing calls this directly
no test coverage detected