fix: validate ID parsing in API routes and player pages for Prisma v7

This commit is contained in:
2026-03-31 00:21:02 -07:00
parent 0f66815ed4
commit a1fb0e25a7
4 changed files with 28 additions and 4 deletions
+5 -1
View File
@@ -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 },