Skip to content

Commit aed2554

Browse files
committed
feat: implement user deletion and cleanup scripts
- Added soft deletion functionality for user accounts, allowing for account recovery while ensuring related data is cleaned up to prevent orphaned references. - Introduced new scripts for cleaning up orphaned user data and sessions with null tokens, enhancing data integrity and system performance. - Updated package.json with new cleanup commands and improved session management in the application. - Enhanced API documentation for user deletion endpoint and related cleanup processes.
1 parent 1a7c6d3 commit aed2554

11 files changed

Lines changed: 1939 additions & 314 deletions

‎package-lock.json‎

Lines changed: 58 additions & 305 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@
2121
"test:waitlist": "tsx src/test-waitlist-seed.ts",
2222
"migrate:comments-posted": "tsx src/migrations/add-comments-posted-field.ts",
2323
"seed:hackathon-participants": "tsx src/scripts/seed-hackathon-participants.ts",
24-
"seed:hackathon-companies": "tsx src/scripts/seed-hackathon-companies.ts"
24+
"seed:hackathon-companies": "tsx src/scripts/seed-hackathon-companies.ts",
25+
"cleanup:orphaned-data": "tsx scripts/cleanup-all-orphaned-data.ts",
26+
"cleanup:orphaned-data:dry-run": "tsx scripts/cleanup-all-orphaned-data.ts --dry-run",
27+
"cleanup:user-data": "tsx scripts/cleanup-orphaned-user-data.ts",
28+
"fix:sessions": "tsx scripts/fix-sessions-issue.ts",
29+
"fix:sessions:cleanup": "tsx scripts/cleanup-null-sessions.ts",
30+
"fix:sessions:index": "tsx scripts/fix-sessions-index.ts"
2531
},
2632
"keywords": [],
2733
"author": "",
@@ -45,7 +51,7 @@
4551
"@types/swagger-ui-express": "^4.1.8",
4652
"axios": "^1.8.4",
4753
"bcryptjs": "^3.0.2",
48-
"better-auth": "^1.3.34",
54+
"better-auth": "^1.4.3",
4955
"cloudinary": "^2.6.0",
5056
"compression": "^1.8.0",
5157
"cookie-parser": "^1.4.7",
@@ -65,7 +71,7 @@
6571
"morgan": "^1.10.0",
6672
"multer": "^1.4.5-lts.2",
6773
"node-cron": "^4.1.1",
68-
"nodemailer": "^6.10.1",
74+
"nodemailer": "^7.0.11",
6975
"soroban-client": "^1.0.1",
7076
"swagger-jsdoc": "^6.2.8",
7177
"swagger-ui-express": "^5.0.1",

‎render.yaml‎

Whitespace-only changes.

0 commit comments

Comments
 (0)