1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-31 18:31:01 +00:00

Ask for confirmation before flushing history

This commit is contained in:
Frédéric Guillot 2019-07-17 21:29:00 -07:00
parent 99149d9f2a
commit ac3693562b
4 changed files with 19 additions and 8 deletions

View file

@ -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")
}