fix: add support for Clerk IDs and activity endpoint

- Update getUserProfile to accept both database ID and Clerk ID
- Update getUserReports to handle Clerk IDs
- Update getUserEvents to handle Clerk IDs
- Add getUserActivity endpoint to return timeline of user actions
- Add activity route GET /api/users/:id/activity
- Fix TypeScript errors with const assertions

This fixes 404 errors when frontend uses Clerk IDs to fetch user data
This commit is contained in:
2025-11-16 21:39:38 +00:00
parent c84bcb2fd6
commit bee80be87d
4 changed files with 200 additions and 8 deletions

View File

@@ -259,7 +259,7 @@
- Create verification audit log
- _Requirements: 7.1, 7.2, 7.3, 7.4, 7.5_
- [-] 31. Build user profile endpoints
- [x] 31. Build user profile endpoints
- Create GET /api/users/:id for profile retrieval
- Implement PATCH /api/users/:id for profile updates
- Build GET /api/users/:id/reports endpoint