This commit is contained in:
dahyeon committed 2026-04-27 15:00:25 -07:00
1 parent c5d296d403
commit 2250b6072e
22 files changed
+1719 -42

No files matched your search

@@ -92,6 +92,11 @@ export class MatchService {
public async serialize(match: MatchDocument) {
const obj = match.toObject();
if (obj.result?.games) {
obj.result.games = [...obj.result.games].sort(
(left, right) => left.gameNumber - right.gameNumber,
);
}
return {
...obj,
gameCount: match.gameCount || DEFAULT_TOURNAMENT_GAME_COUNT,
@@ -116,6 +121,8 @@ export class MatchService {
await this.tournamentCodeService.releaseFromMatch(match);
match.tournamentCodeIds = [];
match.teamBuiltAt = undefined;
match.result = undefined;
match.resultPollState = undefined;
}
await match.save();
return match;