Refactoring for Gin, NoSurf and SCS continues.
This commit is contained in:
@@ -5,11 +5,10 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
|
||||
"synlotto-website/internal/helpers"
|
||||
templateHelpers "synlotto-website/internal/helpers/template"
|
||||
"synlotto-website/internal/models"
|
||||
"synlotto-website/internal/storage"
|
||||
resultsThunderballStorage "synlotto-website/internal/storage/results/thunderball"
|
||||
)
|
||||
|
||||
func NewDraw(db *sql.DB) http.HandlerFunc {
|
||||
@@ -45,7 +44,7 @@ func Submit(db *sql.DB, w http.ResponseWriter, r *http.Request) {
|
||||
Thunderball: helpers.Atoi(r.FormValue("thunderball")),
|
||||
}
|
||||
|
||||
err := storage.InsertThunderballResult(db, draw)
|
||||
err := resultsThunderballStorage.InsertThunderballResult(db, draw)
|
||||
if err != nil {
|
||||
log.Println("❌ Failed to insert draw:", err)
|
||||
http.Error(w, "Failed to save draw", http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user