mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-13 05:12:06 +00:00
fix(multiplayer): validate ranked arena paths durably
This commit is contained in:
@@ -120,8 +120,8 @@ func CreateMatchFromAcceptedProposal(ctx context.Context, db *sql.DB, plan Accep
|
||||
if !validAcceptedPlaylistCount(domain.Playlist(playlist), len(plan.Players)) {
|
||||
return fmt.Errorf("accepted proposal playlist does not match player count")
|
||||
}
|
||||
if domain.Playlist(playlist) == domain.Ranked && plan.ArenaPath == "" {
|
||||
return fmt.Errorf("ranked accepted match plan has no arena")
|
||||
if domain.Playlist(playlist) == domain.Ranked && !domain.IsRankedArenaPath(plan.ArenaPath) {
|
||||
return fmt.Errorf("ranked accepted match plan has invalid arena")
|
||||
}
|
||||
participants, err := acceptedProposalParticipants(ctx, tx, plan)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user