aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui/history_entries.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/history_entries.go')
-rw-r--r--ui/history_entries.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/ui/history_entries.go b/ui/history_entries.go
index de12539..25310a9 100644
--- a/ui/history_entries.go
+++ b/ui/history_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 (
// ShowHistoryPage renders the page with all read entries.
func (c *Controller) ShowHistoryPage(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
@@ -46,8 +43,8 @@ func (c *Controller) ShowHistoryPage(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)
view.Set("entries", entries)
view.Set("total", count)
view.Set("pagination", c.getPagination(route.Path(c.router, "history"), count, offset))