From 9726df66062f11b8437f7e813d269653e9cb9df3 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 17:35:06 +0000 Subject: [PATCH] Fix duplicate variable declaration --- supabase/functions/process-selective-approval/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/supabase/functions/process-selective-approval/index.ts b/supabase/functions/process-selective-approval/index.ts index 05a910c5..28ad833d 100644 --- a/supabase/functions/process-selective-approval/index.ts +++ b/supabase/functions/process-selective-approval/index.ts @@ -163,7 +163,7 @@ serve(async (req) => { // Update submission status const allApproved = approvalResults.every(r => r.success); - const { error: submissionError } = await supabase + const { error: updateError } = await supabase .from('content_submissions') .update({ status: allApproved ? 'approved' : 'partially_approved', @@ -172,8 +172,8 @@ serve(async (req) => { }) .eq('id', submissionId); - if (submissionError) { - console.error('Failed to update submission status:', submissionError); + if (updateError) { + console.error('Failed to update submission status:', updateError); } return new Response(