From 4c51b63201c5b28f38cbf9919c8a2826c095af9f Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Mon, 17 Nov 2025 12:21:08 +0900 Subject: (김준회) 오류 수정: route.ts에서 Promise 타입의 params를 await 처리 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/partners/rfq-last/[id]/response/route.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app/api') diff --git a/app/api/partners/rfq-last/[id]/response/route.ts b/app/api/partners/rfq-last/[id]/response/route.ts index 06ace9a0..ef83f4a3 100644 --- a/app/api/partners/rfq-last/[id]/response/route.ts +++ b/app/api/partners/rfq-last/[id]/response/route.ts @@ -36,7 +36,7 @@ async function saveFileStream(file: File, filepath: string) { export async function POST( request: NextRequest, - { params }: { params: { id: string } } + { params }: { params: Promise<{ id: string }> } ) { try { const session = await getServerSession(authOptions) @@ -44,7 +44,8 @@ export async function POST( return NextResponse.json({ error: "Unauthorized" }, { status: 401 }) } - const rfqId = parseInt(params.id) + const { id } = await params + const rfqId = parseInt(id) const formData = await request.formData() const data = JSON.parse(formData.get('data') as string) const files = formData.getAll('attachments') as File[] @@ -284,7 +285,7 @@ export async function POST( export async function PUT( request: NextRequest, - { params }: { params: { id: string } } + { params }: { params: Promise<{ id: string }> } ) { try { const session = await getServerSession(authOptions) @@ -292,7 +293,8 @@ export async function PUT( return NextResponse.json({ error: "Unauthorized" }, { status: 401 }) } - const rfqId = parseInt(params.id) + const { id } = await params + const rfqId = parseInt(id) const formData = await request.formData() const data = JSON.parse(formData.get('data') as string) const files = formData.getAll('attachments') as File[] -- cgit v1.2.3