~netlandish/gobwebs

1f9abf82718278ae77eed0cd9c5ba83c86b92f4c — Peter Sanchez 2 years ago 9bdc5f8
Renaming default template context maps to use 'guser' to be more externally compat
2 files changed, 7 insertions(+), 7 deletions(-)

M accounts/routes.go
M server/server.go
M accounts/routes.go => accounts/routes.go +6 -6
@@ 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)

M server/server.go => server/server.go +1 -1
@@ 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 {