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:
@@ -11,6 +11,7 @@ router.patch('/:id', requireAuth, userController.updateUserProfile.bind(userCont
|
||||
// User reports and events
|
||||
router.get('/:id/reports', userController.getUserReports.bind(userController));
|
||||
router.get('/:id/events', userController.getUserEvents.bind(userController));
|
||||
router.get('/:id/activity', userController.getUserActivity.bind(userController));
|
||||
|
||||
// Notification preferences
|
||||
router.patch('/:id/preferences', requireAuth, userController.updateNotificationPreferences.bind(userController));
|
||||
|
||||
Reference in New Issue
Block a user