aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui/history_flush.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/history_flush.go')
-rw-r--r--ui/history_flush.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/history_flush.go b/ui/history_flush.go
index d0b8f62..e74c5b9 100644
--- a/ui/history_flush.go
+++ b/ui/history_flush.go
@@ -8,16 +8,15 @@ import (
"net/http"
"miniflux.app/http/request"
- "miniflux.app/http/response/html"
- "miniflux.app/http/route"
+ "miniflux.app/http/response/json"
)
func (h *handler) flushHistory(w http.ResponseWriter, r *http.Request) {
err := h.store.FlushHistory(request.UserID(r))
if err != nil {
- html.ServerError(w, r, err)
+ json.ServerError(w, r, err)
return
}
- html.Redirect(w, r, route.Path(h.router, "history"))
+ json.OK(w, r, "OK")
}