From c1ab62a44f86d6ce6221848bd384cf1787e0e059 Mon Sep 17 00:00:00 2001 From: Michael Mainguy Date: Fri, 11 Aug 2023 06:21:51 -0500 Subject: [PATCH] changed to simple response. --- functions/api/voice/token.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/functions/api/voice/token.ts b/functions/api/voice/token.ts index 9a987e8..42e46dd 100644 --- a/functions/api/voice/token.ts +++ b/functions/api/voice/token.ts @@ -4,12 +4,13 @@ interface Env { export const onRequest: PagesFunction = async (context) => { try { console.log('start'); - const res = await fetch('https://api.assemblyai.com/v2/realtime/token', - {method: 'POST', body: JSON.stringify({expires_in: 3600}), headers: {authorization: context.env.VOICE_TOKEN}}); - console.log(res); - const response = await res.json(); - console.log(res); - return Response.json(response); + /* const res = await fetch('https://api.assemblyai.com/v2/realtime/token', + {method: 'POST', body: JSON.stringify({expires_in: 3600}), headers: {authorization: context.env.VOICE_TOKEN}}); + + */ + + + return new Response("Hello World!", {status: 200}); } catch (error) { return new Response(error.message, {status: 500}); }