feat: Add user management APIs, status enum, enhanced notifications
- Add updateUser and resetUserPassword admin endpoints - Change company status from boolean to enum (registered, lead, customer, inactive) - Add 'important' event type to calendar validators and email templates - Add 1-hour-before event notifications cron job - Add 18:00 evening notifications for next-day events - Add contact description field support - Fix count() function usage in admin service - Add SQL migrations for schema changes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,17 @@ router.get(
|
||||
adminController.getUser
|
||||
);
|
||||
|
||||
// Update user details
|
||||
router.patch(
|
||||
'/users/:userId',
|
||||
validateParams(z.object({ userId: z.string().uuid() })),
|
||||
validateBody(z.object({
|
||||
firstName: z.string().max(100).optional(),
|
||||
lastName: z.string().max(100).optional(),
|
||||
})),
|
||||
adminController.updateUser
|
||||
);
|
||||
|
||||
// Zmena role usera
|
||||
router.patch(
|
||||
'/users/:userId/role',
|
||||
@@ -39,6 +50,13 @@ router.patch(
|
||||
adminController.changeUserRole
|
||||
);
|
||||
|
||||
// Reset user password
|
||||
router.post(
|
||||
'/users/:userId/reset-password',
|
||||
validateParams(z.object({ userId: z.string().uuid() })),
|
||||
adminController.resetUserPassword
|
||||
);
|
||||
|
||||
// Zmazanie usera
|
||||
router.delete(
|
||||
'/users/:userId',
|
||||
|
||||
Reference in New Issue
Block a user