Privacy & Data Control - account deletion and data export#437
Privacy & Data Control - account deletion and data export#437atul-upadhyay-7 wants to merge 7 commits into
Conversation
- Add data export endpoint to download all user data as JSON - Add account deletion endpoint with confirmation - Add PrivacySettings component to dashboard settings - Users can export their data or delete their account - GDPR compliance and user data ownership
|
Someone is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Required fixes before merge:
-
Broken
webhook_deliveriesexport query —.eq('webhook_id', webhooks?.map(w => w.id) || [])passes an array to.eq()which expects a scalar. This silently returns zero rows. Change to.in('webhook_id', webhooks?.map(w => w.id) || []). -
Same bug in deletion — the
tablesToDeleteentry forwebhook_deliveriesuses.eq('user_id', user.id)butwebhook_deliverieshas nouser_idcolumn (onlywebhook_id). This is a no-op. The cascade viawebhook_configs ON DELETE CASCADEhandles this correctly, so remove the explicitwebhook_deliveriesentry fromtablesToDelete. -
Hardcoded Tailwind colors —
border-green-500/30,bg-green-500/10,text-green-400,border-red-500/30,bg-red-500,hover:bg-red-600inPrivacySettings.tsx. Use CSS variables per project convention. -
Missing EOF newlines on
data-export/route.tsandPrivacySettings.tsx.
- Fix broken webhook_deliveries export query: change .eq() to .in() for array matching - Remove webhook_deliveries from tablesToDelete (handled by ON DELETE CASCADE) - Replace hardcoded Tailwind colors with CSS variables (--success, --destructive) - Add --destructive CSS variable to globals.css for both light and dark themes - Add EOF newlines to data-export/route.ts and PrivacySettings.tsx
Fixes AppliedAddressed all mentor review feedback: 1. Broken webhook_deliveries export query
2. Broken deletion query for webhook_deliveries
3. Hardcoded Tailwind colors replaced with CSS variables
4. EOF Newlines
|
…move unused interface - Replace error message hardcoded red colors with --destructive CSS variable - Remove unused DataStats interface from PrivacySettings.tsx
Additional Fixes AppliedAfter deep analysis against issue #380 requirements, found and fixed remaining gaps: 1. Error Message Colors
2. Code Cleanup
Complete Issue #380 Coverage
All Mentor Blockers Resolved
|
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
The account deletion calls DELETE /api/user/data-export but the data-export/route.ts file only implements the GET handler (data export). The DELETE method handler is missing — the deletion will return 405.
Please add an export async function DELETE() to src/app/api/user/data-export/route.ts (or a separate /api/user/delete-account route) that:
- Verifies the session
- Deletes the user's Supabase row (and cascade deletes via foreign keys)
- Invalidates the session
|
@Priyanshu-byte-coder Review 1 (4 issues by Priyanshu-byte-coder):
Review 2 (DELETE handler by Priyanshu-byte-coder):
Files changed:
This completes the privacy & data control feature requested in issue #380. |
Implements privacy and data control features as requested in #380.
Features
API Endpoints
Components
GDPR Compliance