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

Refactor feed creation to allow setting most fields via API

Allow API clients to create disabled feeds or define field like "ignore_http_cache".
This commit is contained in:
Frédéric Guillot 2021-01-02 16:33:41 -08:00 committed by fguillot
parent ab82c4b300
commit f0610bdd9c
26 changed files with 370 additions and 264 deletions

View file

@ -8,19 +8,18 @@ import (
"net/http"
"miniflux.app/config"
"miniflux.app/reader/feed"
"miniflux.app/storage"
"miniflux.app/template"
"miniflux.app/worker"
"github.com/gorilla/mux"
"github.com/mitchellh/go-server-timing"
servertiming "github.com/mitchellh/go-server-timing"
)
// Serve declares all routes for the user interface.
func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool, feedHandler *feed.Handler) {
func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool) {
middleware := newMiddleware(router, store)
handler := &handler{router, store, template.NewEngine(router), pool, feedHandler}
handler := &handler{router, store, template.NewEngine(router), pool}
uiRouter := router.NewRoute().Subrouter()
uiRouter.Use(middleware.handleUserSession)