diff options
author | 2017-11-21 18:37:08 -0800 | |
---|---|---|
committer | 2017-11-21 18:37:08 -0800 | |
commit | 1bc43ec2bc2282d9e18ca622444d45f09c1b6378 (patch) | |
tree | acadc7a1bbbc508c0beee3bdb48879820eb1c2f0 /server/ui/controller/controller.go | |
parent | 02ff7b4bcf2b2c691e55ae61fe97bfd9ae37658e (diff) | |
download | v2-1bc43ec2bc2282d9e18ca622444d45f09c1b6378.tar.gz v2-1bc43ec2bc2282d9e18ca622444d45f09c1b6378.tar.zst v2-1bc43ec2bc2282d9e18ca622444d45f09c1b6378.zip |
Improve Context to be more idiomatic
Diffstat (limited to 'server/ui/controller/controller.go')
-rw-r--r-- | server/ui/controller/controller.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/ui/controller/controller.go b/server/ui/controller/controller.go index 535fbba4..22c9dce4 100644 --- a/server/ui/controller/controller.go +++ b/server/ui/controller/controller.go @@ -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 } |