- Replaced legacy TemplateContext calls with structured TemplateData usage - Removed unused variables and redundant storage calls in notifications handler - Ensured consistent use of BuildTemplateData across user-facing handlers - Resolved all compile-time errors from refactor - Ready for runtime testing and further layout integration
20 lines
412 B
Go
20 lines
412 B
Go
package helpers
|
|
|
|
// ToDo should be a handler?
|
|
import (
|
|
"html/template"
|
|
"net/http"
|
|
|
|
"synlotto-website/models"
|
|
)
|
|
|
|
func Render403(w http.ResponseWriter, r *http.Request) {
|
|
context := TemplateContext(w, r, models.TemplateData{})
|
|
tmpl := template.Must(template.New("").Funcs(TemplateFuncs()).ParseFiles(
|
|
"templates/layout.html",
|
|
"templates/error/403.html",
|
|
))
|
|
|
|
tmpl.ExecuteTemplate(w, "layout", context)
|
|
}
|