fix: validate tournament ID parsing for Prisma v7 strict type checking
This commit is contained in:
@@ -12,7 +12,11 @@ interface PageProps {
|
||||
}
|
||||
|
||||
export default async function TournamentResultsPage({ params }: PageProps) {
|
||||
const tournamentId = parseInt(params.id)
|
||||
const tournamentId = parseInt(params.id, 10)
|
||||
|
||||
if (isNaN(tournamentId)) {
|
||||
notFound()
|
||||
}
|
||||
|
||||
// Check if user can manage this tournament
|
||||
const permission = await canManageTournament(tournamentId)
|
||||
|
||||
Reference in New Issue
Block a user