Fix selective-approval RPC params

Update edge function to call process_approval_transaction with correct parameters:
- remove p_trace_id and p_parent_span_id
- add p_approval_mode: 'selective' and p_idempotency_key: idempotencyKey
This aligns with database function signature and resolves 500 error.

X-Lovable-Edit-ID: edt-6e45b77e-1d54-4173-af1a-dcbcd886645d
This commit is contained in:
gpt-engineer-app[bot]
2025-11-12 15:12:31 +00:00

View File

@@ -207,8 +207,8 @@ const handler = async (req: Request, context: { supabase: any; user: any; span:
p_moderator_id: user.id,
p_submitter_id: submission.user_id,
p_request_id: requestId,
p_trace_id: rootSpan.traceId,
p_parent_span_id: rpcSpan.spanId
p_approval_mode: 'selective',
p_idempotency_key: idempotencyKey
}
);