Skip to content

Commit

Permalink
fix id datatype in get single question endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
riddhesh-mahajan committed Oct 31, 2023
1 parent 8078f19 commit 1d401cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/backend/app/api/questions/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ const prisma = new PrismaClient();

export async function GET(
request: Request,
{ params }: { params: { id: number } }
{ params }: { params: { id: string } }
) {
const targetQuestion = await prisma.qa.findFirst({
where: { id: params.id },
where: { id: parseInt(params.id) },
});

return createResponse({
Expand Down

0 comments on commit 1d401cb

Please sign in to comment.