mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 18:31:12 -05:00
Fix remaining compliance violations
This commit is contained in:
@@ -96,7 +96,10 @@ serve(async (req) => {
|
||||
throw new Error('Confirmation code has expired. Please request a new deletion code.');
|
||||
}
|
||||
|
||||
console.log('Deactivating account and confirming deletion request...');
|
||||
edgeLogger.info('Deactivating account and confirming deletion request', {
|
||||
userId: user.id,
|
||||
requestId: tracking.requestId
|
||||
});
|
||||
|
||||
// Deactivate profile
|
||||
const { error: profileError } = await supabaseClient
|
||||
@@ -109,7 +112,11 @@ serve(async (req) => {
|
||||
.eq('user_id', user.id);
|
||||
|
||||
if (profileError) {
|
||||
console.error('Error deactivating profile:', profileError);
|
||||
edgeLogger.error('Error deactivating profile', {
|
||||
error: profileError.message,
|
||||
userId: user.id,
|
||||
requestId: tracking.requestId
|
||||
});
|
||||
throw profileError;
|
||||
}
|
||||
|
||||
@@ -122,7 +129,10 @@ serve(async (req) => {
|
||||
.eq('id', deletionRequest.id);
|
||||
|
||||
if (updateError) {
|
||||
console.error('Error updating deletion request:', updateError);
|
||||
edgeLogger.error('Error updating deletion request', {
|
||||
error: updateError.message,
|
||||
requestId: tracking.requestId
|
||||
});
|
||||
throw updateError;
|
||||
}
|
||||
|
||||
@@ -160,9 +170,12 @@ serve(async (req) => {
|
||||
`,
|
||||
}),
|
||||
});
|
||||
console.log('Deletion confirmation email sent');
|
||||
edgeLogger.info('Deletion confirmation email sent', { requestId: tracking.requestId });
|
||||
} catch (emailError) {
|
||||
console.error('Failed to send email:', emailError);
|
||||
edgeLogger.error('Failed to send email', {
|
||||
error: emailError instanceof Error ? emailError.message : String(emailError),
|
||||
requestId: tracking.requestId
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user