Optimize tournament series leaderboard, tiebreak by placements

This commit is contained in:
Kalle
2026-08-22 07:30:15 +03:00
parent 35eb90356b
commit bee8cee3aa
6 changed files with 403 additions and 139 deletions

View File

@@ -226,6 +226,11 @@ export function buildCases(fx: Fixtures): {
add("CalendarRepository.findResultsByEventId", fx.resultsEventId, (eventId) =>
CalendarRepository.findResultsByEventId(eventId),
);
add(
"CalendarRepository.findTopThreeResultsByEventIds",
fx.resultsEventId,
(eventId) => CalendarRepository.findTopThreeResultsByEventIds([eventId]),
);
// FriendRepository
add("FriendRepository.findByUserIdWithActivity", fx.heavyFriendPair, (pair) =>
@@ -1091,10 +1096,10 @@ export function buildCases(fx: Fixtures): {
(window) => TournamentRepository.findAllBetweenTwoTimestamps(window),
);
add(
"TournamentRepository.findTopThreeResultsByTournamentId",
"TournamentRepository.findTopThreeResultsByTournamentIds",
fx.heavyTournamentId,
(tournamentId) =>
TournamentRepository.findTopThreeResultsByTournamentId(tournamentId),
TournamentRepository.findTopThreeResultsByTournamentIds([tournamentId]),
);
add(
"TournamentRepository.findFriendCodesByTournamentId",