diff --git a/back/internal/api/handler/search.go b/back/internal/api/handler/search.go index dfd2285..d9c1083 100644 --- a/back/internal/api/handler/search.go +++ b/back/internal/api/handler/search.go @@ -137,6 +137,10 @@ func (h *SearchHandler) Get(w http.ResponseWriter, r *http.Request) { // DELETE /searches/{id} func (h *SearchHandler) Delete(w http.ResponseWriter, r *http.Request) { + if h.demo { + respond.Error(w, http.StatusForbidden, "demo mode: deletions are disabled") + return + } id := chi.URLParam(r, "id") if err := h.manager.Delete(id); err != nil { respond.Error(w, http.StatusNotFound, err.Error())