mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add feature to refresh all feeds from the user interface
This commit is contained in:
parent
480b0d94e2
commit
855fb06bc9
19 changed files with 104 additions and 55 deletions
|
@ -13,6 +13,22 @@ import (
|
|||
"github.com/miniflux/miniflux2/server/ui/form"
|
||||
)
|
||||
|
||||
// RefreshAllFeeds refresh all feeds in the background.
|
||||
func (c *Controller) RefreshAllFeeds(ctx *core.Context, request *core.Request, response *core.Response) {
|
||||
user := ctx.LoggedUser()
|
||||
jobs, err := c.store.NewBatch(c.store.CountFeeds(user.ID))
|
||||
if err != nil {
|
||||
response.HTML().ServerError(err)
|
||||
return
|
||||
}
|
||||
|
||||
go func() {
|
||||
c.pool.Push(jobs)
|
||||
}()
|
||||
|
||||
response.Redirect(ctx.Route("feeds"))
|
||||
}
|
||||
|
||||
// ShowFeedsPage shows the page with all subscriptions.
|
||||
func (c *Controller) ShowFeedsPage(ctx *core.Context, request *core.Request, response *core.Response) {
|
||||
user := ctx.LoggedUser()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue