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
|
@ -29,7 +29,7 @@ type Controller struct {
|
|||
}
|
||||
|
||||
func (c *Controller) getCommonTemplateArgs(ctx *core.Context) (tplParams, error) {
|
||||
user := ctx.GetLoggedUser()
|
||||
user := ctx.LoggedUser()
|
||||
builder := c.store.GetEntryQueryBuilder(user.ID, user.Timezone)
|
||||
builder.WithStatus(model.EntryStatusUnread)
|
||||
|
||||
|
@ -42,7 +42,7 @@ func (c *Controller) getCommonTemplateArgs(ctx *core.Context) (tplParams, error)
|
|||
"menu": "",
|
||||
"user": user,
|
||||
"countUnread": countUnread,
|
||||
"csrf": ctx.GetCsrfToken(),
|
||||
"csrf": ctx.CsrfToken(),
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue