mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Ask for confirmation before clicking on mark all as read
This commit is contained in:
parent
ac3693562b
commit
a634839678
19 changed files with 39 additions and 66 deletions
|
@ -8,15 +8,14 @@ import (
|
|||
"net/http"
|
||||
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/html"
|
||||
"miniflux.app/http/route"
|
||||
"miniflux.app/logger"
|
||||
"miniflux.app/http/response/json"
|
||||
)
|
||||
|
||||
func (h *handler) markAllAsRead(w http.ResponseWriter, r *http.Request) {
|
||||
if err := h.store.MarkAllAsRead(request.UserID(r)); err != nil {
|
||||
logger.Error("[MarkAllAsRead] %v", err)
|
||||
json.ServerError(w, r, err)
|
||||
return
|
||||
}
|
||||
|
||||
html.Redirect(w, r, route.Path(h.router, "unread"))
|
||||
json.OK(w, r, "OK")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue