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:
parent
99149d9f2a
commit
ac3693562b
4 changed files with 19 additions and 8 deletions
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue