Still working through messages and notifications.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user