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/search_entries.go | |
parent | 88e81d4d800ff6433518522954197d75203a25c2 (diff) |
Refactor HTTP context handling
Diffstat (limited to 'ui/search_entries.go')
-rw-r--r-- | ui/search_entries.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ui/search_entries.go b/ui/search_entries.go index e6b533e..3f17ede 100644 --- a/ui/search_entries.go +++ b/ui/search_entries.go @@ -7,7 +7,6 @@ package ui // import "miniflux.app/ui" import ( "net/http" - "miniflux.app/http/context" "miniflux.app/http/request" "miniflux.app/http/response/html" "miniflux.app/http/route" @@ -18,9 +17,7 @@ import ( // ShowSearchEntries shows all entries for the given feed. func (c *Controller) ShowSearchEntries(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 @@ -48,8 +45,8 @@ func (c *Controller) ShowSearchEntries(w http.ResponseWriter, r *http.Request) { return } - 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) pagination := c.getPagination(route.Path(c.router, "searchEntries"), count, offset) pagination.SearchQuery = searchQuery |