feat: Add manual event notification endpoint for admins

- POST /api/events/:eventId/notify - send notifications from admin's email
- sendSingleEventNotification() uses admin's primary email account
- getSenderAccountByUserId() to get admin's email credentials

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
richardtekula
2025-12-16 09:06:30 +01:00
parent 2d6198b5f8
commit 548a8effdb
5 changed files with 184 additions and 3 deletions

View File

@@ -69,4 +69,14 @@ router.delete(
eventController.deleteEvent
);
/**
* POST /api/events/:eventId/notify - Odoslať notifikácie priradeným používateľom (iba admin)
*/
router.post(
'/:eventId/notify',
requireAdmin,
validateParams(eventIdSchema),
eventController.sendEventNotification
);
export default router;