fix: await params in DELETE route for Next.js 15 async params

This commit is contained in:
Marko Djordjevic 2026-02-17 22:33:38 +01:00
parent 6ef102cf21
commit e00bd4d804

View file

@ -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);