Still working through messages and notifications.

This commit is contained in:
2025-10-30 17:22:52 +00:00
parent 8650b1fd63
commit 262536135d
18 changed files with 154 additions and 128 deletions

View File

@@ -7,10 +7,10 @@ package accountMessageHandler
import (
"net/http"
templateHandlers "synlotto-website/internal/handlers/template"
templateHelpers "synlotto-website/internal/helpers/template"
"synlotto-website/internal/logging"
"synlotto-website/internal/models"
"synlotto-website/internal/platform/bootstrap"
"github.com/gin-gonic/gin"
@@ -33,8 +33,8 @@ func (h *AccountMessageHandlers) List(c *gin.Context) {
return
}
// Build template context just like LoginGet
ctx := templateHelpers.TemplateContext(c.Writer, c.Request, models.TemplateData{})
data := templateHandlers.BuildTemplateData(app, c.Writer, c.Request)
ctx := templateHelpers.TemplateContext(c.Writer, c.Request, data)
if f := sm.PopString(c.Request.Context(), "flash"); f != "" {
ctx["Flash"] = f
@@ -73,7 +73,9 @@ func (h *AccountMessageHandlers) ReadGet(c *gin.Context) {
return
}
ctx := templateHelpers.TemplateContext(c.Writer, c.Request, models.TemplateData{})
data := templateHandlers.BuildTemplateData(app, c.Writer, c.Request)
ctx := templateHelpers.TemplateContext(c.Writer, c.Request, data)
if f := sm.PopString(c.Request.Context(), "flash"); f != "" {
ctx["Flash"] = f
}