1
0
Fork 0
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:
Frédéric Guillot 2019-07-17 21:52:45 -07:00
parent ac3693562b
commit a634839678
19 changed files with 39 additions and 66 deletions

View file

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