feat(reminders): получатели в отложенных/входящих, приватные сообщения чата, календарь, бейдж уведомлений
This commit is contained in:
@@ -27,6 +27,21 @@ export function registerChatNotificationRoutes(router: Router): void {
|
||||
}
|
||||
);
|
||||
|
||||
// Счётчик непрочитанных уведомлений (бейдж в навигации)
|
||||
router.get('/api/notifications/unread-count',
|
||||
authenticateToken,
|
||||
tenantIsolation,
|
||||
async (req: AuthenticatedRequest, res) => {
|
||||
try {
|
||||
const count = await storage.getUnreadNotificationCount(req.user!.id, req.organizationId!);
|
||||
res.json({ count });
|
||||
} catch (error) {
|
||||
console.error('Get unread notification count error:', error);
|
||||
res.status(500).json({ success: false, count: 0 });
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// Mark notification as read
|
||||
router.put('/api/notifications/:id/read',
|
||||
authenticateToken,
|
||||
|
||||
Reference in New Issue
Block a user