fix: await params in DELETE route for Next.js 15 async params
This commit is contained in:
parent
6ef102cf21
commit
e00bd4d804
1 changed files with 2 additions and 2 deletions
|
|
@ -5,9 +5,9 @@ const INFERENCE_API_TIMEOUT = parseInt(process.env.INFERENCE_API_TIMEOUT || '100
|
|||
|
||||
export async function DELETE(
|
||||
_request: NextRequest,
|
||||
{ params }: { params: { run_id: string } }
|
||||
{ params }: { params: Promise<{ run_id: string }> }
|
||||
) {
|
||||
const { run_id } = params;
|
||||
const { run_id } = await params;
|
||||
const controller = new AbortController();
|
||||
const timeoutId = setTimeout(() => controller.abort(), INFERENCE_API_TIMEOUT);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue