1
0
Fork 0
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:
Frédéric Guillot 2017-11-21 18:37:08 -08:00
parent 02ff7b4bcf
commit 1bc43ec2bc
17 changed files with 107 additions and 106 deletions

View file

@ -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
}