mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-25 01:31:13 -05:00
feat: Implement plan for bug fixes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useReducer } from 'react';
|
||||
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
||||
import { AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter } from '@/components/ui/alert-dialog';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
@@ -57,9 +58,11 @@ export function AccountDeletionDialog({ open, onOpenChange, userEmail, onDeletio
|
||||
dispatch({ type: 'SET_LOADING', payload: true });
|
||||
|
||||
try {
|
||||
const { data, error } = await supabase.functions.invoke('request-account-deletion', {
|
||||
body: {},
|
||||
});
|
||||
const { data, error, requestId } = await invokeWithTracking(
|
||||
'request-account-deletion',
|
||||
{},
|
||||
(await supabase.auth.getUser()).data.user?.id
|
||||
);
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
@@ -88,9 +91,11 @@ export function AccountDeletionDialog({ open, onOpenChange, userEmail, onDeletio
|
||||
dispatch({ type: 'SET_LOADING', payload: true });
|
||||
|
||||
try {
|
||||
const { error } = await supabase.functions.invoke('confirm-account-deletion', {
|
||||
body: { confirmation_code: state.confirmationCode },
|
||||
});
|
||||
const { error, requestId } = await invokeWithTracking(
|
||||
'confirm-account-deletion',
|
||||
{ confirmation_code: state.confirmationCode },
|
||||
(await supabase.auth.getUser()).data.user?.id
|
||||
);
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
@@ -110,9 +115,11 @@ export function AccountDeletionDialog({ open, onOpenChange, userEmail, onDeletio
|
||||
dispatch({ type: 'SET_LOADING', payload: true });
|
||||
|
||||
try {
|
||||
const { error } = await supabase.functions.invoke('resend-deletion-code', {
|
||||
body: {},
|
||||
});
|
||||
const { error, requestId } = await invokeWithTracking(
|
||||
'resend-deletion-code',
|
||||
{},
|
||||
(await supabase.auth.getUser()).data.user?.id
|
||||
);
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user