repair get notification error detail

This commit is contained in:
2025-11-18 13:35:58 +07:00
parent 919824bb41
commit 46c69aafa0
4 changed files with 153 additions and 4 deletions

View File

@@ -41,7 +41,16 @@ const InsertNotificationErrorDb = async () => {
await pool.query(insertQuery);
};
const getNotificationByIdDb = async (id) => {
const queryText = `
SELECT
a.*
FROM notification_error a
WHERE a.notification_error_id = $1 AND a.deleted_at IS NULL
`;
const result = await pool.query(queryText, [id]);
return result.recordset[0];
};
const getAllNotificationDb = async (searchParams = {}) => {
let queryParams = [];
@@ -145,5 +154,6 @@ const getAllNotificationDb = async (searchParams = {}) => {
};
module.exports = {
getNotificationByIdDb,
getAllNotificationDb,
};