mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 13:51:12 -05:00
Refactor account deletion flow
This commit is contained in:
@@ -20,11 +20,11 @@ serve(async (req) => {
|
||||
|
||||
console.log('Processing scheduled account deletions...');
|
||||
|
||||
// Find pending deletion requests that are past their scheduled date
|
||||
// Find confirmed deletion requests that are past their scheduled date
|
||||
const { data: pendingDeletions, error: fetchError } = await supabaseAdmin
|
||||
.from('account_deletion_requests')
|
||||
.select('*')
|
||||
.eq('status', 'pending')
|
||||
.eq('status', 'confirmed')
|
||||
.lt('scheduled_deletion_at', new Date().toISOString());
|
||||
|
||||
if (fetchError) {
|
||||
|
||||
Reference in New Issue
Block a user