Просмотр исходного кода

fix: resolve background sync issues for WooCommerce and ShopRenter #24

Fixed multiple issues preventing scheduled background synchronization:

1. **ShopRenter trigger function**: Applied the same fix from issue #23
   - Updated trigger_shoprenter_scheduled_sync() to use correct net.http_post() parameter order
   - Changed from current_setting() to system_config table for configuration
   - Added missing 'params' parameter that was preventing headers from being sent

2. **ShopRenter pg_cron job**: Created missing hourly sync job
   - Job name: shoprenter-hourly-sync
   - Schedule: Every hour at minute 0 (0 * * * *)
   - The migration file existed but the job was never created

3. **JWT verification blocking sync**: Disabled JWT verification for scheduled sync functions
   - Added config for woocommerce-scheduled-sync and shoprenter-scheduled-sync in config.toml
   - Set verify_jwt = false for both functions
   - Redeployed both Edge Functions with updated configuration
   - Scheduled sync now works correctly (returns 200 OK instead of 401 Unauthorized)

All scheduled sync infrastructure is now properly configured and operational.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude 5 месяцев назад
Родитель
Сommit
5e0b8a7c7d
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      supabase/config.toml

+ 6 - 0
supabase/config.toml

@@ -24,3 +24,9 @@ verify_jwt = false
 
 [functions.gdpr-webhooks]
 verify_jwt = false
+
+[functions.woocommerce-scheduled-sync]
+verify_jwt = false
+
+[functions.shoprenter-scheduled-sync]
+verify_jwt = false