repair: notification error log

This commit is contained in:
2025-11-25 14:56:49 +07:00
parent 78a813e9ec
commit 662cf6f5f3
4 changed files with 31 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ const {
const {
getAllNotificationErrorLogDb,
getNotificationErrorLogByNotificationErrorIdDb,
} = require('../db/notification_error_log.db');
const { getFileUploadByPathDb } = require('../db/file_uploads.db');
@@ -78,8 +79,7 @@ class NotificationService {
}
// Get activity logs for this notification
const activityLogs = (await getAllNotificationErrorLogDb()) || [];
const notificationLogs = activityLogs.filter(log => log.notification_error_id === parseInt(id));
const notificationLogs = (await getNotificationErrorLogByNotificationErrorIdDb(id)) || [];
notification.activity_logs = notificationLogs;