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:
@@ -74,7 +74,7 @@ export async function GET(req: NextRequest) {
|
|||||||
|
|
||||||
const filename = `${safeName}_click.wav`;
|
const filename = `${safeName}_click.wav`;
|
||||||
|
|
||||||
return new NextResponse(wav, {
|
return new NextResponse(new Uint8Array(wav), {
|
||||||
status: 200,
|
status: 200,
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "audio/wav",
|
"Content-Type": "audio/wav",
|
||||||
|
|||||||
Reference in New Issue
Block a user