Browse Source

fix: specify explicit FK relationship for phone_numbers join in stores API #65

Claude 5 months ago
parent
commit
9bfda79
1 changed files with 2 additions and 2 deletions
  1. 2 2
      supabase/functions/api/index.ts

+ 2 - 2
supabase/functions/api/index.ts

@@ -62,7 +62,7 @@ serve(async (req) => {
         .from('stores')
         .from('stores')
         .select(includeSyncConfig ? `
         .select(includeSyncConfig ? `
           *,
           *,
-          phone_numbers (
+          phone_numbers!stores_phone_number_id_fkey (
             id,
             id,
             phone_number,
             phone_number,
             country_code,
             country_code,
@@ -78,7 +78,7 @@ serve(async (req) => {
           )
           )
         ` : `
         ` : `
           *,
           *,
-          phone_numbers (
+          phone_numbers!stores_phone_number_id_fkey (
             id,
             id,
             phone_number,
             phone_number,
             country_code,
             country_code,