Skip to content

Commit 473a7b4

Browse files
committed
fix: update parameter destructuring in POST function for correct context handling
1 parent 3cdbd78 commit 473a7b4

File tree

1 file changed

+2
-2
lines changed
  • app/api/generate/[framework]/[fileName]

1 file changed

+2
-2
lines changed

app/api/generate/[framework]/[fileName]/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ function mapOutputFileToTemplateType(outputFile: string): string {
1818

1919
export async function POST(
2020
request: NextRequest,
21-
{ params }: { params: { framework: string; fileName: string } },
21+
context: { params: Promise<{ framework: string; fileName: string }> },
2222
) {
2323
try {
24-
const { framework, fileName } = params
24+
const { framework, fileName } = await context.params
2525
const responses = (await request.json()) as WizardResponses
2626

2727
const frameworkFromPath =

0 commit comments

Comments
 (0)