bracket visualization bug fixes

This commit is contained in:
2026-03-13 16:13:20 +01:00
parent b164f287af
commit 82f5da58f8
3 changed files with 53 additions and 11 deletions

View File

@@ -120,11 +120,11 @@ export class MatchService {
[matchId],
(err, match: any) => {
if (err) return reject(err);
if (!match) return reject(new Error('Match nicht gefunden'));
if (!match) return reject(new Error('Match not found'));
// Validate that the winnerId is one of the participants
if (match.team1Id !== winnerId && match.team2Id !== winnerId) {
return reject(new Error('Der Sieger muss eines der Teams dieses Matches sein'));
return reject(new Error('Winner must be one of the match participants'));
}
// Update the match with winner
@@ -182,7 +182,7 @@ export class MatchService {
[matchId],
(err, match: any) => {
if (err) return reject(err);
if (!match) return reject(new Error('Match nicht gefunden'));
if (!match) return reject(new Error('Match not found'));
const previousWinnerId = match.winnerId;