(w http.ResponseWriter, r *http.Request)
| 706 | } |
| 707 | |
| 708 | func (s *Server) unarchiveNote(w http.ResponseWriter, r *http.Request) { |
| 709 | var req struct { |
| 710 | Path string `json:"path"` |
| 711 | } |
| 712 | if err := readJSON(r, &req); err != nil { |
| 713 | http.Error(w, err.Error(), http.StatusBadRequest) |
| 714 | return |
| 715 | } |
| 716 | meta, err := s.currentVault().UnarchiveNote(req.Path) |
| 717 | if err != nil { |
| 718 | writeError(w, err) |
| 719 | return |
| 720 | } |
| 721 | writeJSON(w, http.StatusOK, meta) |
| 722 | } |
| 723 | |
| 724 | func (s *Server) duplicateNote(w http.ResponseWriter, r *http.Request) { |
| 725 | var req struct { |
nothing calls this directly
no test coverage detected