Cleanup: Finalize template context integration and remove legacy code

- 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
This commit is contained in:
2025-04-01 21:20:05 +01:00
parent 03b1e095ce
commit 5ea780fcab
11 changed files with 35 additions and 45 deletions

View File

@@ -10,12 +10,13 @@ import (
"strconv"
"synlotto-website/helpers"
"synlotto-website/models"
services "synlotto-website/services/tickets"
)
func AdminTriggersHandler(db *sql.DB) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
context := helpers.TemplateContext(w, r)
context := helpers.TemplateContext(w, r, models.TemplateData{})
// Inject flash message if available
if flash := r.URL.Query().Get("flash"); flash != "" {