repair: change readers to users in detail notification
This commit is contained in:
@@ -2,7 +2,7 @@ const {
|
||||
getAllNotificationDb,
|
||||
getNotificationByIdDb,
|
||||
InsertNotificationErrorDb,
|
||||
getReaderNotificationErrorDb,
|
||||
getUsersNotificationErrorDb,
|
||||
updateNotificationErrorDb,
|
||||
} = require('../db/notification_error.db');
|
||||
|
||||
@@ -64,7 +64,7 @@ class NotificationService {
|
||||
throw new ErrorHandler(404, 'Notification not found');
|
||||
}
|
||||
|
||||
const readerNotification = (await getReaderNotificationErrorDb(id))|| [];
|
||||
const usersNotification = (await getUsersNotificationErrorDb(id))|| [];
|
||||
|
||||
// Get error code details if error_code_id exists
|
||||
if (notification.error_code_id) {
|
||||
@@ -106,7 +106,7 @@ class NotificationService {
|
||||
// Get activity logs for this notification
|
||||
const notificationLogs = (await getNotificationErrorLogByNotificationErrorIdDb(id)) || [];
|
||||
|
||||
notification.reader = readerNotification;
|
||||
notification.users = usersNotification;
|
||||
|
||||
notification.activity_logs = notificationLogs;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user