mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-13 08:32:15 +00:00
fix(multiplayer): repair allocated compose verification
This commit is contained in:
@@ -81,9 +81,14 @@ func PromoteStoredAcceptedProposal(ctx context.Context, db *sql.DB, proposalID s
|
||||
return fmt.Errorf("invalid stored proposal promotion arguments")
|
||||
}
|
||||
plan := AcceptedMatchPlan{MatchID: "match-" + proposalID, ProposalID: proposalID}
|
||||
if err := db.QueryRowContext(ctx, StoredProposalMatchPlanSQL, proposalID).Scan(&plan.Region, &plan.Protocol, &plan.ArenaPath); err != nil {
|
||||
// Casual proposals intentionally persist no arena path. Scan it as nullable
|
||||
// here just as the in-transaction promotion path does, so an API retry after
|
||||
// the atomic promotion does not turn a successful acceptance into a 503.
|
||||
var arenaPath sql.NullString
|
||||
if err := db.QueryRowContext(ctx, StoredProposalMatchPlanSQL, proposalID).Scan(&plan.Region, &plan.Protocol, &arenaPath); err != nil {
|
||||
return err
|
||||
}
|
||||
plan.ArenaPath = arenaPath.String
|
||||
rows, err := db.QueryContext(ctx, StoredProposalMatchPlayersSQL, proposalID)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user