fix: use fetch param type instead of RequestInit

This commit is contained in:
Linus Rath
2026-04-08 13:18:07 +02:00
parent 10cbe7a637
commit 63593e2146
+1 -1
View File
@@ -96,7 +96,7 @@ export async function POST(request: NextRequest) {
redirect: 'follow',
// `duplex: 'half'` is required by undici when sending a streaming request body.
...(method === 'PUT' ? { duplex: 'half' } : {}),
} as RequestInit & { duplex?: 'half' });
} as Parameters<typeof fetch>[1] & { duplex?: 'half' });
// For file downloads (GET), stream the response back
if (method === 'GET') {