fix: wrap WAV Buffer in Uint8Array for NextResponse compatibility

NextResponse's BodyInit type doesn't accept Node.js Buffer directly.
Wrapping in Uint8Array satisfies the type and works at runtime.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
AJ Avezzano
2026-04-01 11:26:38 -04:00
parent 2d12160e39
commit 986f30d8cc

View File

@@ -74,7 +74,7 @@ export async function GET(req: NextRequest) {
const filename = `${safeName}_click.wav`;
return new NextResponse(wav, {
return new NextResponse(new Uint8Array(wav), {
status: 200,
headers: {
"Content-Type": "audio/wav",