mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add link to mark everything as read
This commit is contained in:
parent
efac11e082
commit
c57cafbef2
7 changed files with 39 additions and 6 deletions
10
ui/unread.go
10
ui/unread.go
|
@ -6,6 +6,7 @@ package ui
|
|||
|
||||
import (
|
||||
"github.com/miniflux/miniflux/http/handler"
|
||||
"github.com/miniflux/miniflux/logger"
|
||||
"github.com/miniflux/miniflux/model"
|
||||
)
|
||||
|
||||
|
@ -47,3 +48,12 @@ func (c *Controller) ShowUnreadPage(ctx *handler.Context, request *handler.Reque
|
|||
"csrf": ctx.CSRF(),
|
||||
})
|
||||
}
|
||||
|
||||
// MarkAllAsRead marks all unread entries as read.
|
||||
func (c *Controller) MarkAllAsRead(ctx *handler.Context, request *handler.Request, response *handler.Response) {
|
||||
if err := c.store.MarkAllAsRead(ctx.UserID()); err != nil {
|
||||
logger.Error("[MarkAllAsRead] %v", err)
|
||||
}
|
||||
|
||||
response.Redirect(ctx.Route("unread"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue