Refactor: Redeploy edge function

This commit is contained in:
gpt-engineer-app[bot]
2025-11-06 04:25:29 +00:00
parent f94dbd70f5
commit 090f6aca48

View File

@@ -1,4 +1,4 @@
// Force redeployment: v101 - Inlined validation to fix bundling timeout // Force redeployment: v102 - Schema refresh for temp_location_data column
import { serve } from "https://deno.land/std@0.190.0/http/server.ts"; import { serve } from "https://deno.land/std@0.190.0/http/server.ts";
import { createClient } from "https://esm.sh/@supabase/supabase-js@2.57.4"; import { createClient } from "https://esm.sh/@supabase/supabase-js@2.57.4";
import { createErrorResponse } from "../_shared/errorSanitizer.ts"; import { createErrorResponse } from "../_shared/errorSanitizer.ts";
@@ -849,6 +849,16 @@ serve(withRateLimit(async (req) => {
// Merge temp refs for this item // Merge temp refs for this item
...(tempRefsByItemId.get(item.id) || {}) ...(tempRefsByItemId.get(item.id) || {})
}; };
// DEBUG: Log what columns are present
edgeLogger.info('Park item data loaded', {
action: 'approval_park_data_debug',
itemId: item.id,
hasLocationId: !!itemData.location_id,
hasTempLocationData: !!itemData.temp_location_data,
tempLocationDataKeys: itemData.temp_location_data ? Object.keys(itemData.temp_location_data) : [],
parkSubmissionKeys: Object.keys((item as any).park_submission || {}),
requestId: tracking.requestId
});
break; break;
case 'ride': case 'ride':
itemData = { itemData = {