CognxSafeTrack commited on
Commit
8f86281
·
1 Parent(s): 0349430

fix: cast meta.json() to typed interface to fix TS18046 strict error

Browse files
Files changed (1) hide show
  1. apps/api/src/routes/whatsapp.ts +2 -1
apps/api/src/routes/whatsapp.ts CHANGED
@@ -133,7 +133,8 @@ export async function whatsappRoutes(fastify: FastifyInstance) {
133
  const metaRes = await fetch(`https://graph.facebook.com/v18.0/${audioId}`, {
134
  headers: { 'Authorization': `Bearer ${accessToken}` }
135
  });
136
- const meta = await metaRes.json();
 
137
 
138
  // 2. Download binary media
139
  if (meta.url) {
 
133
  const metaRes = await fetch(`https://graph.facebook.com/v18.0/${audioId}`, {
134
  headers: { 'Authorization': `Bearer ${accessToken}` }
135
  });
136
+ const meta = await metaRes.json() as { url?: string };
137
+
138
 
139
  // 2. Download binary media
140
  if (meta.url) {