mirror of
https://github.com/miniflux/v2.git
synced 2025-08-16 18:01:37 +00:00
Refactor config package
- Parse configuration only once during startup time - Store configuration values in a global variable
This commit is contained in:
parent
04d85b3c63
commit
228862fefa
28 changed files with 922 additions and 624 deletions
|
@ -7,6 +7,7 @@ package ui // import "miniflux.app/ui"
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/html"
|
||||
"miniflux.app/ui/form"
|
||||
|
@ -59,7 +60,7 @@ func (h *handler) showIntegrationPage(w http.ResponseWriter, r *http.Request) {
|
|||
view.Set("user", user)
|
||||
view.Set("countUnread", h.store.CountUnreadEntries(user.ID))
|
||||
view.Set("countErrorFeeds", h.store.CountErrorFeeds(user.ID))
|
||||
view.Set("hasPocketConsumerKeyConfigured", h.cfg.PocketConsumerKey("") != "")
|
||||
view.Set("hasPocketConsumerKeyConfigured", config.Opts.PocketConsumerKey("") != "")
|
||||
|
||||
html.OK(w, r, view.Render("integrations"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue