1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-06 17:41:00 +00:00

Add feature to refresh all feeds from the user interface

This commit is contained in:
Frédéric Guillot 2017-11-21 22:36:00 -08:00
parent 480b0d94e2
commit 855fb06bc9
19 changed files with 104 additions and 55 deletions

View file

@ -8,6 +8,7 @@ import (
"github.com/miniflux/miniflux2/model"
"github.com/miniflux/miniflux2/reader/feed"
"github.com/miniflux/miniflux2/reader/opml"
"github.com/miniflux/miniflux2/scheduler"
"github.com/miniflux/miniflux2/server/core"
"github.com/miniflux/miniflux2/storage"
)
@ -22,8 +23,10 @@ func (t tplParams) Merge(d tplParams) tplParams {
return t
}
// Controller contains all HTTP handlers for the user interface.
type Controller struct {
store *storage.Storage
pool *scheduler.WorkerPool
feedHandler *feed.Handler
opmlHandler *opml.Handler
}
@ -47,9 +50,11 @@ func (c *Controller) getCommonTemplateArgs(ctx *core.Context) (tplParams, error)
return params, nil
}
func NewController(store *storage.Storage, feedHandler *feed.Handler, opmlHandler *opml.Handler) *Controller {
// NewController returns a new Controller.
func NewController(store *storage.Storage, pool *scheduler.WorkerPool, feedHandler *feed.Handler, opmlHandler *opml.Handler) *Controller {
return &Controller{
store: store,
pool: pool,
feedHandler: feedHandler,
opmlHandler: opmlHandler,
}