(w http.ResponseWriter, r *http.Request)
| 738 | } |
| 739 | |
| 740 | func (s *Server) moveNote(w http.ResponseWriter, r *http.Request) { |
| 741 | var req struct { |
| 742 | Path string `json:"path"` |
| 743 | TargetFolder vault.NoteFolder `json:"targetFolder"` |
| 744 | TargetSubpath string `json:"targetSubpath"` |
| 745 | } |
| 746 | if err := readJSON(r, &req); err != nil { |
| 747 | http.Error(w, err.Error(), http.StatusBadRequest) |
| 748 | return |
| 749 | } |
| 750 | meta, err := s.currentVault().MoveNote(req.Path, req.TargetFolder, req.TargetSubpath) |
| 751 | if err != nil { |
| 752 | writeError(w, err) |
| 753 | return |
| 754 | } |
| 755 | writeJSON(w, http.StatusOK, meta) |
| 756 | } |
| 757 | |
| 758 | // --- Folders --- |
| 759 |
nothing calls this directly
no test coverage detected