repair get notification error detail
This commit is contained in:
@@ -57,9 +57,21 @@ const deleteErrorCodeDb = async (brandId, errorCode, deletedBy) => {
|
||||
return true;
|
||||
};
|
||||
|
||||
// Get error code by error_code_id
|
||||
const getErrorCodeByIdDb = async (error_code_id) => {
|
||||
const queryText = `
|
||||
SELECT
|
||||
a.*
|
||||
FROM brand_code a
|
||||
WHERE a.error_code_id = $1 AND a.deleted_at IS NULL
|
||||
`;
|
||||
const result = await pool.query(queryText, [error_code_id]);
|
||||
return result.recordset[0];
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getErrorCodesByBrandIdDb,
|
||||
getErrorCodeByIdDb,
|
||||
createErrorCodeDb,
|
||||
updateErrorCodeDb,
|
||||
deleteErrorCodeDb,
|
||||
|
||||
Reference in New Issue
Block a user