From 1f9abf82718278ae77eed0cd9c5ba83c86b92f4c Mon Sep 17 00:00:00 2001 From: Peter Sanchez Date: Thu, 18 Aug 2022 11:59:07 -0600 Subject: [PATCH] Renaming default template context maps to use 'guser' to be more externally compat --- accounts/routes.go | 12 ++++++------ server/server.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/accounts/routes.go b/accounts/routes.go index c0ee064..6e518ad 100644 --- a/accounts/routes.go +++ b/accounts/routes.go @@ -186,7 +186,7 @@ func (s *Service) LoginEmailPOST(c echo.Context) error { }, } data := gobwebs.Map{ - "user": user, + "guser": user, "confirmation": conf, } helper := email.NewHelper(gctx.Server.Email, tmap, tmpl) @@ -402,7 +402,7 @@ func (s *Service) ForgotPasswordPOST(c echo.Context) error { }, } data := gobwebs.Map{ - "user": user, + "guser": user, "confirmation": conf, } helper := email.NewHelper(gctx.Server.Email, tmap, tmpl) @@ -453,8 +453,8 @@ func (s *Service) ForgotPasswordConf(c echo.Context) error { } return gctx.Render(http.StatusOK, "forgot_password_conf.html", gobwebs.Map{ - "user": user, - "key": key, + "guser": user, + "key": key, }) } @@ -495,7 +495,7 @@ func (s *Service) ForgotPasswordConfPOST(c echo.Context) error { return gctx.Render(http.StatusOK, "forgot_password_conf.html", gobwebs.Map{ "errors": err, "form": form, - "user": user, + "guser": user, "key": key, }) default: @@ -719,7 +719,7 @@ func (s *Service) UpdateEmailPOST(c echo.Context) error { }, } data := gobwebs.Map{ - "user": gctx.User, + "guser": gctx.User, "confirmation": conf, } helper := email.NewHelper(gctx.Server.Email, tmap, tmpl) diff --git a/server/server.go b/server/server.go index 28e9e10..5bcb2a0 100644 --- a/server/server.go +++ b/server/server.go @@ -111,7 +111,7 @@ func (s *Server) HTTPErrorHandler(err error, c echo.Context) { gctx := c.(*Context) errmap := gobwebs.Map{ - "user": gctx.User, + "guser": gctx.User, } if he.Code > 499 { -- 2.45.2