Refactoring for Gin, NoSurf and SCS continues.
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
"synlotto-website/internal/helpers"
|
||||
"synlotto-website/internal/models"
|
||||
|
||||
"github.com/gorilla/csrf"
|
||||
"github.com/justinas/nosurf"
|
||||
)
|
||||
|
||||
func AddTicket(db *sql.DB) http.HandlerFunc {
|
||||
@@ -46,7 +46,7 @@ func AddTicket(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
data := models.TemplateData{}
|
||||
context := templateHelpers.TemplateContext(w, r, data)
|
||||
context["csrfField"] = csrf.TemplateField(r)
|
||||
context["CSRFToken"] = nosurf.Token(r)
|
||||
context["DrawDates"] = drawDates
|
||||
|
||||
tmpl := templateHelpers.LoadTemplateFiles("add_ticket.html", "templates/account/tickets/add_ticket.html")
|
||||
|
||||
Reference in New Issue
Block a user