diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-09-03 14:26:40 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-09-03 14:26:40 -0700 |
commit | eee1f3190355224eef63a4dcdef8c36eb3ca3738 (patch) | |
tree | 009b7ca67b96d9be473d8ddf2c8c95f22a6749d1 /ui/integration_show.go | |
parent | 88e81d4d800ff6433518522954197d75203a25c2 (diff) |
Refactor HTTP context handling
Diffstat (limited to 'ui/integration_show.go')
-rw-r--r-- | ui/integration_show.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ui/integration_show.go b/ui/integration_show.go index 0ae3eee..1c8adce 100644 --- a/ui/integration_show.go +++ b/ui/integration_show.go @@ -7,7 +7,7 @@ package ui // import "miniflux.app/ui" import ( "net/http" - "miniflux.app/http/context" + "miniflux.app/http/request" "miniflux.app/http/response/html" "miniflux.app/ui/form" "miniflux.app/ui/session" @@ -16,9 +16,7 @@ import ( // ShowIntegrations renders the page with all external integrations. func (c *Controller) ShowIntegrations(w http.ResponseWriter, r *http.Request) { - ctx := context.New(r) - - user, err := c.store.UserByID(ctx.UserID()) + user, err := c.store.UserByID(request.UserID(r)) if err != nil { html.ServerError(w, err) return @@ -55,8 +53,8 @@ func (c *Controller) ShowIntegrations(w http.ResponseWriter, r *http.Request) { PocketConsumerKey: integration.PocketConsumerKey, } - sess := session.New(c.store, ctx) - view := view.New(c.tpl, ctx, sess) + sess := session.New(c.store, request.SessionID(r)) + view := view.New(c.tpl, r, sess) view.Set("form", integrationForm) view.Set("menu", "settings") view.Set("user", user) |