Refactoring for Gin, NoSurf and SCS continues.
This commit is contained in:
@@ -8,11 +8,13 @@ import (
|
||||
lotteryTicketHandlers "synlotto-website/internal/handlers/lottery/tickets"
|
||||
thunderballrules "synlotto-website/internal/rules/thunderball"
|
||||
services "synlotto-website/internal/services/draws"
|
||||
lotteryTicketService "synlotto-website/internal/services/tickets"
|
||||
|
||||
"synlotto-website/internal/helpers"
|
||||
"synlotto-website/internal/models"
|
||||
)
|
||||
|
||||
// ToDo: SQL in here needs to me moved out the handler!
|
||||
func RunTicketMatching(db *sql.DB, triggeredBy string) (models.MatchRunStats, error) {
|
||||
stats := models.MatchRunStats{}
|
||||
|
||||
@@ -212,7 +214,8 @@ func RefreshTicketPrizes(db *sql.DB) error {
|
||||
|
||||
mainMatches := helpers.CountMatches(matchTicket.Balls, draw.Balls)
|
||||
bonusMatches := helpers.CountMatches(matchTicket.BonusBalls, draw.BonusBalls)
|
||||
prizeTier := matcher.GetPrizeTier(row.GameType, mainMatches, bonusMatches, thunderballrules.ThunderballPrizeRules)
|
||||
// ToDo: this isn't a lottery ticket service really its a draw one
|
||||
prizeTier := lotteryTicketService.GetPrizeTier(row.GameType, mainMatches, bonusMatches, thunderballrules.ThunderballPrizeRules)
|
||||
isWinner := prizeTier != ""
|
||||
|
||||
var label string
|
||||
|
||||
Reference in New Issue
Block a user