From e81b31c9ee8a0dc0b47d1eccc11cea6f71aa358d Mon Sep 17 00:00:00 2001 From: alma Date: Tue, 6 Jan 2026 18:58:21 +0100 Subject: [PATCH] Refactir --- lib/services/notifications/leantime-adapter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/services/notifications/leantime-adapter.ts b/lib/services/notifications/leantime-adapter.ts index fa680c26..7d9c4ca4 100644 --- a/lib/services/notifications/leantime-adapter.ts +++ b/lib/services/notifications/leantime-adapter.ts @@ -320,12 +320,12 @@ export class LeantimeAdapter implements NotificationAdapter { } // Mark each notification as read - const markPromises = unreadNotifications.map(async (notification) => { + const markPromises = unreadNotifications.map(async (notification: { id: number | string; sourceId: string }) => { // Use the ID directly (we already have it from the API response) const notificationId = typeof notification.id === 'number' ? notification.id : parseInt(String(notification.id || notification.sourceId)); if (isNaN(notificationId)) { - console.error(`[LEANTIME_ADAPTER] markAllAsRead - Invalid notification ID: ${sourceId}`); + console.error(`[LEANTIME_ADAPTER] markAllAsRead - Invalid notification ID: ${notification.id || notification.sourceId}`); return false; }