repair: get notif error byid
This commit is contained in:
@@ -11,9 +11,6 @@ const {
|
||||
getSolutionsByErrorCodeIdDb,
|
||||
} = require('../db/brand_code_solution.db');
|
||||
|
||||
const {
|
||||
getSparePartnsByErrorCodeIdDb,
|
||||
} = require('../db/sparepart.db');
|
||||
|
||||
const {
|
||||
getAllNotificationErrorLogDb,
|
||||
@@ -73,13 +70,9 @@ class NotificationService {
|
||||
})
|
||||
);
|
||||
|
||||
// Get spareparts for this error code
|
||||
const spareparts = (await getSparePartnsByErrorCodeIdDb(errorCode.error_code_id)) || [];
|
||||
|
||||
notification.error_code = {
|
||||
...errorCode,
|
||||
solution: solutionsWithDetails,
|
||||
sparepart: spareparts
|
||||
solution: solutionsWithDetails
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user