Преглед изворни кода

fix(vapi-webhook): add missing id field for call_logs insert

Fszontagh пре 4 месеци
родитељ
комит
b12fc63bd5
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      supabase/functions/vapi-webhook/index.ts

+ 3 - 0
supabase/functions/vapi-webhook/index.ts

@@ -130,6 +130,9 @@ serve(async (req) => {
 
     // Prepare call log data
     const callLogData = {
+      // Primary key - generate UUID for the call log
+      id: crypto.randomUUID(),
+
       // VAPI-specific fields
       vapi_call_id: call?.id || crypto.randomUUID(),
       vapi_timestamp: timestamp,