Minor cleanup.

This commit is contained in:
mikestefanello 2021-12-19 16:34:19 -05:00
parent 28bda89863
commit d2ce5c34c4
2 changed files with 4 additions and 6 deletions

View file

@ -73,7 +73,7 @@ func (t *Controller) RenderPage(c echo.Context, p Page) error {
}
// Execute the parsed templates to render the page
buf, err := t.executeTemplates(c, p)
buf, err := t.executeTemplates(p)
if err != nil {
c.Logger().Errorf("failed to execute templates: %v", err)
return echo.NewHTTPError(http.StatusInternalServerError, "Internal server error")
@ -164,7 +164,7 @@ func (t *Controller) parsePageTemplates(p Page) error {
}
// executeTemplates executes the cached templates belonging to Page and renders the Page within them
func (t *Controller) executeTemplates(c echo.Context, p Page) (*bytes.Buffer, error) {
func (t *Controller) executeTemplates(p Page) (*bytes.Buffer, error) {
tmpl, ok := templates.Load(p.Name)
if !ok {
return nil, errors.New("uncached page template requested")