|
|
@@ -765,10 +765,10 @@ serve(wrapHandler('shoprenter-sync', async (req) => {
|
|
|
|
|
|
// Check data access permissions
|
|
|
// Get access policies from store_sync_config
|
|
|
- const { data: syncConfig } = await supabase
|
|
|
+ const { data: syncConfig } = await supabaseAdmin
|
|
|
.from('store_sync_config')
|
|
|
.select('products_access_policy, orders_access_policy, customers_access_policy')
|
|
|
- .eq('store_id', store_id)
|
|
|
+ .eq('store_id', storeId)
|
|
|
.single()
|
|
|
|
|
|
// Only sync if policy is 'sync' (not 'api_only' or 'not_allowed')
|