diff --git a/supabase/functions/process-selective-approval/index.ts b/supabase/functions/process-selective-approval/index.ts index 47b3fd77..3191f3df 100644 --- a/supabase/functions/process-selective-approval/index.ts +++ b/supabase/functions/process-selective-approval/index.ts @@ -1,4 +1,6 @@ +import { serve } from 'https://deno.land/std@0.190.0/http/server.ts'; import { createEdgeFunction } from '../_shared/edgeFunctionWrapper.ts'; +import { corsHeadersWithTracing } from '../_shared/cors.ts'; import { addSpanEvent, setSpanAttributes, @@ -289,13 +291,11 @@ const handler = async (req: Request, context: { supabase: any; user: any; span: }; // Create edge function with automatic error handling, CORS, auth, and logging -createEdgeFunction( +serve(createEdgeFunction( { name: 'process-selective-approval', requireAuth: true, - corsEnabled: true, - enableTracing: true, - rateLimitTier: 'moderate' + corsHeaders: corsHeadersWithTracing, }, handler -); +));