mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Improve Context to be more idiomatic
This commit is contained in:
parent
02ff7b4bcf
commit
1bc43ec2bc
17 changed files with 107 additions and 106 deletions
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
// ShowUnreadPage render the page with all unread entries.
|
||||
func (c *Controller) ShowUnreadPage(ctx *core.Context, request *core.Request, response *core.Response) {
|
||||
user := ctx.GetLoggedUser()
|
||||
user := ctx.LoggedUser()
|
||||
offset := request.QueryIntegerParam("offset", 0)
|
||||
|
||||
builder := c.store.GetEntryQueryBuilder(user.ID, user.Timezone)
|
||||
|
@ -37,8 +37,8 @@ func (c *Controller) ShowUnreadPage(ctx *core.Context, request *core.Request, re
|
|||
"user": user,
|
||||
"countUnread": countUnread,
|
||||
"entries": entries,
|
||||
"pagination": c.getPagination(ctx.GetRoute("unread"), countUnread, offset),
|
||||
"pagination": c.getPagination(ctx.Route("unread"), countUnread, offset),
|
||||
"menu": "unread",
|
||||
"csrf": ctx.GetCsrfToken(),
|
||||
"csrf": ctx.CsrfToken(),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue