From 50958f3486103ae0da79bf7b61ae7547d545fbde Mon Sep 17 00:00:00 2001 From: Michael Mainguy Date: Thu, 10 Aug 2023 15:18:35 -0500 Subject: [PATCH] Changed from axios to fetch. --- functions/api/voice/token.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/api/voice/token.ts b/functions/api/voice/token.ts index 2db8fe7..1df1733 100644 --- a/functions/api/voice/token.ts +++ b/functions/api/voice/token.ts @@ -3,7 +3,7 @@ interface Env { } const handler: ExportedHandler = { - async fetch(request, env: Env, context) { + async fetch(request, env) { async function gatherResponse(response) { const {headers} = response; const contentType = headers.get("content-type") || ""; @@ -20,7 +20,7 @@ const handler: ExportedHandler = { }; const response = await fetch('https://api.assemblyai.com/v2/realtime/token', init); const results = await gatherResponse(response); - return new Response(results, init); + return new Response(results); } } export default handler;