fix: include participants in getManageableTournaments query

This commit is contained in:
2026-03-30 21:34:16 -07:00
parent c27aec72fc
commit d821dd7ce2
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -194,6 +194,7 @@ export async function getManageableTournaments() {
// Club admins can see all tournaments
return prisma.event.findMany({
where: { eventType: 'tournament' },
include: { participants: true },
orderBy: { createdAt: 'desc' }
});
}
@@ -205,6 +206,7 @@ export async function getManageableTournaments() {
eventType: 'tournament',
ownerId: userId
},
include: { participants: true },
orderBy: { createdAt: 'desc' }
});
}
@@ -212,6 +214,7 @@ export async function getManageableTournaments() {
// Regular players can only view tournaments (not manage them)
return prisma.event.findMany({
where: { eventType: 'tournament', status: { not: 'draft' } },
include: { participants: true },
orderBy: { createdAt: 'desc' }
});
}