Use consts for route names and templates.

This commit is contained in:
mikestefanello 2023-12-16 11:07:20 -05:00
parent a787d5dc7f
commit 60c8aefd49
30 changed files with 135 additions and 82 deletions

View file

@ -21,7 +21,7 @@ func (c *verifyEmail) Get(ctx echo.Context) error {
email, err := c.Container.Auth.ValidateEmailVerificationToken(token)
if err != nil {
msg.Warning(ctx, "The link is either invalid or has expired.")
return c.Redirect(ctx, "home")
return c.Redirect(ctx, routeNameHome)
}
// Check if it matches the authenticated user
@ -58,5 +58,5 @@ func (c *verifyEmail) Get(ctx echo.Context) error {
}
msg.Success(ctx, "Your email has been successfully verified.")
return c.Redirect(ctx, "home")
return c.Redirect(ctx, routeNameHome)
}