mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 08:23:45 +00:00
fix(server): drop extra unused argument in queue ticket insert
CreateQueueTicket passed 9 arguments to QueueTicketInsertSQL, which only has 8 placeholders (state is a hardcoded 'QUEUED' literal in the SQL, not $4) -- every real queue-ticket creation against PostgreSQL failed with 'mismatched param and argument count'. Found by actually running the opt-in Postgres integration suite (previously never exercised locally, per its own gating) rather than trusting the unit tests, which mock the driver and can't catch a placeholder-count mismatch. Verified fixed against a real postgres:17-alpine container.
This commit is contained in:
@@ -150,7 +150,7 @@ func CreateQueueTicket(ctx context.Context, db *sql.DB, ticketID, playerID, idem
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = tx.ExecContext(ctx, QueueTicketInsertSQL, ticketID, playerID, string(spec.Playlist), string(domain.Queued), spec.ClientBuild, spec.ProtocolVersion, now, ticket.ExpiresAt, predictedRTT)
|
||||
_, err = tx.ExecContext(ctx, QueueTicketInsertSQL, ticketID, playerID, string(spec.Playlist), spec.ClientBuild, spec.ProtocolVersion, now, ticket.ExpiresAt, predictedRTT)
|
||||
return err
|
||||
})
|
||||
return ticket, err
|
||||
|
||||
Reference in New Issue
Block a user