fix: include participants in getManageableTournaments query
This commit is contained in:
@@ -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' }
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user