From 5d9c1b9cea92b63eb013a1ee9a700340d0963b7e Mon Sep 17 00:00:00 2001 From: Raz Date: Thu, 22 May 2025 12:24:27 +0200 Subject: [PATCH] clean up groupstage loser bracket and init --- PadelClub/Views/GroupStage/GroupStagesSettingsView.swift | 2 +- PadelClubTests/ServerDataTests.swift | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/PadelClub/Views/GroupStage/GroupStagesSettingsView.swift b/PadelClub/Views/GroupStage/GroupStagesSettingsView.swift index 67dff1c..f87f6d3 100644 --- a/PadelClub/Views/GroupStage/GroupStagesSettingsView.swift +++ b/PadelClub/Views/GroupStage/GroupStagesSettingsView.swift @@ -78,7 +78,7 @@ struct GroupStagesSettingsView: View { Section { if tournament.groupStageLoserBracket() == nil { RowButtonView("Ajouter des matchs de classements", role: .destructive) { - let round = Round(tournament: tournament.id, index: 0, matchFormat: tournament.loserRoundFormat, groupStageLoserBracket: true) + let round = Round(tournament: tournament.id, index: 0, format: tournament.loserRoundFormat, groupStageLoserBracket: true) do { try tournamentStore?.rounds.addOrUpdate(instance: round) diff --git a/PadelClubTests/ServerDataTests.swift b/PadelClubTests/ServerDataTests.swift index bf013f2..9e06d95 100644 --- a/PadelClubTests/ServerDataTests.swift +++ b/PadelClubTests/ServerDataTests.swift @@ -236,9 +236,7 @@ final class ServerDataTests: XCTestCase { let rounds: [Round] = try await StoreCenter.main.service().get() let parentRoundId = rounds.first?.id - let round = Round(tournament: tournamentId, index: 1, parent: parentRoundId, matchFormat: MatchFormat.nineGames, startDate: Date(), groupStageLoserBracket: false, loserBracketMode: .manual, - plannedStartDate: Date() - ) + let round = Round(tournament: tournamentId, index: 1, parent: parentRoundId, format: MatchFormat.nineGames, startDate: Date(), groupStageLoserBracket: false, loserBracketMode: .manual, plannedStartDate: Date()) round.storeId = "abc" if let r: Round = try await StoreCenter.main.service().post(round) {