add: sparepart in detail notification error
This commit is contained in:
@@ -17,6 +17,10 @@ const {
|
||||
getNotificationErrorLogByNotificationErrorIdDb,
|
||||
} = require('../db/notification_error_log.db');
|
||||
|
||||
const {
|
||||
getSparepartsByErrorCodeIdDb,
|
||||
} = require('../db/brand_sparepart.db');
|
||||
|
||||
const { getFileUploadByPathDb } = require('../db/file_uploads.db');
|
||||
|
||||
const { ErrorHandler } = require('../helpers/error');
|
||||
@@ -71,10 +75,13 @@ class NotificationService {
|
||||
})
|
||||
);
|
||||
|
||||
const spareparts = await getSparepartsByErrorCodeIdDb(errorCode.error_code_id);
|
||||
|
||||
notification.error_code = {
|
||||
...errorCode,
|
||||
solution: solutionsWithDetails
|
||||
};
|
||||
notification.spareparts = spareparts;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user