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:
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
func NewDrawHandler(db *sql.DB) http.HandlerFunc {
|
||||
return helpers.AuthMiddleware(func(w http.ResponseWriter, r *http.Request) {
|
||||
context := helpers.TemplateContext(w, r)
|
||||
context := helpers.TemplateContext(w, r, models.TemplateData{})
|
||||
|
||||
if r.Method == http.MethodPost {
|
||||
game := r.FormValue("game_type")
|
||||
@@ -75,7 +75,7 @@ func DeleteDrawHandler(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
func ListDrawsHandler(db *sql.DB) http.HandlerFunc {
|
||||
return helpers.AuthMiddleware(func(w http.ResponseWriter, r *http.Request) {
|
||||
context := helpers.TemplateContext(w, r)
|
||||
context := helpers.TemplateContext(w, r, models.TemplateData{})
|
||||
draws := []models.DrawSummary{}
|
||||
|
||||
rows, err := db.Query(`
|
||||
|
||||
Reference in New Issue
Block a user