repair: get notif error byid

This commit is contained in:
2025-11-25 11:49:53 +07:00
parent 9dc165e15d
commit 778d6f98e8

View File

@@ -11,9 +11,6 @@ const {
getSolutionsByErrorCodeIdDb, getSolutionsByErrorCodeIdDb,
} = require('../db/brand_code_solution.db'); } = require('../db/brand_code_solution.db');
const {
getSparePartnsByErrorCodeIdDb,
} = require('../db/sparepart.db');
const { const {
getAllNotificationErrorLogDb, getAllNotificationErrorLogDb,
@@ -73,13 +70,9 @@ class NotificationService {
}) })
); );
// Get spareparts for this error code
const spareparts = (await getSparePartnsByErrorCodeIdDb(errorCode.error_code_id)) || [];
notification.error_code = { notification.error_code = {
...errorCode, ...errorCode,
solution: solutionsWithDetails, solution: solutionsWithDetails
sparepart: spareparts
}; };
} }
} }