fix: validate ID parsing in API routes and player pages for Prisma v7
This commit is contained in:
@@ -10,7 +10,11 @@ interface PageProps {
|
||||
}
|
||||
|
||||
export default async function PlayerProfilePage({ params }: PageProps) {
|
||||
const playerId = parseInt(params.id)
|
||||
const playerId = parseInt(params.id, 10)
|
||||
|
||||
if (isNaN(playerId)) {
|
||||
notFound()
|
||||
}
|
||||
|
||||
const player = await prisma.player.findUnique({
|
||||
where: { id: playerId },
|
||||
|
||||
Reference in New Issue
Block a user