Use consts for route names and templates.
This commit is contained in:
parent
5af18e2473
commit
c2b6928fb4
30 changed files with 135 additions and 82 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
"github.com/mikestefanello/pagoda/pkg/context"
|
||||
"github.com/mikestefanello/pagoda/pkg/controller"
|
||||
"github.com/mikestefanello/pagoda/templates"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
|
@ -30,9 +31,9 @@ func (e *errorHandler) Get(err error, ctx echo.Context) {
|
|||
}
|
||||
|
||||
page := controller.NewPage(ctx)
|
||||
page.Layout = "main"
|
||||
page.Title = http.StatusText(code)
|
||||
page.Name = "error"
|
||||
page.Layout = templates.LayoutMain
|
||||
page.Name = templates.PageError
|
||||
page.StatusCode = code
|
||||
page.HTMX.Request.Enabled = false
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue