refactor: remove live legacy bracket mode
This commit is contained in:
1 parent
78a2c7cf0d
commit
575cd911cb
4 files changed
+55
-6
No files matched your search
@@ -20,6 +20,7 @@ interface PublicMatchSource {
|
||||
gameCount: number;
|
||||
gameMode: MatchGameMode;
|
||||
roundRobinMaxRounds?: number;
|
||||
doubleElimination?: { resetFinalEnabled?: boolean };
|
||||
hostUserId?: IdLike;
|
||||
participants: Array<{
|
||||
userId: IdLike;
|
||||
@@ -71,10 +72,16 @@ export function presentPublicMatch(
|
||||
scheduledAt: asIso(source.scheduledAt),
|
||||
maxParticipants: source.maxParticipants,
|
||||
gameCount: source.gameCount,
|
||||
gameMode: source.gameMode,
|
||||
gameMode: source.gameMode === 'bracket' ? 'pair' : source.gameMode,
|
||||
...(source.roundRobinMaxRounds === undefined
|
||||
? {}
|
||||
: { roundRobinMaxRounds: source.roundRobinMaxRounds }),
|
||||
...(source.gameMode === 'double-elimination'
|
||||
? {
|
||||
doubleEliminationResetFinalEnabled:
|
||||
source.doubleElimination?.resetFinalEnabled ?? false,
|
||||
}
|
||||
: {}),
|
||||
...(source.hostUserId ? { hostUserId: source.hostUserId.toString() } : {}),
|
||||
participants: source.participants.map((participant) => ({
|
||||
userId: participant.userId.toString(),
|
||||
|
||||
Reference in new issue
Block a user