(w http.ResponseWriter, r *http.Request)
| 690 | } |
| 691 | |
| 692 | func (s *Server) archiveNote(w http.ResponseWriter, r *http.Request) { |
| 693 | var req struct { |
| 694 | Path string `json:"path"` |
| 695 | } |
| 696 | if err := readJSON(r, &req); err != nil { |
| 697 | http.Error(w, err.Error(), http.StatusBadRequest) |
| 698 | return |
| 699 | } |
| 700 | meta, err := s.currentVault().ArchiveNote(req.Path) |
| 701 | if err != nil { |
| 702 | writeError(w, err) |
| 703 | return |
| 704 | } |
| 705 | writeJSON(w, http.StatusOK, meta) |
| 706 | } |
| 707 | |
| 708 | func (s *Server) unarchiveNote(w http.ResponseWriter, r *http.Request) { |
| 709 | var req struct { |
nothing calls this directly
no test coverage detected