repair: detail notif get with error_channel

This commit is contained in:
2025-12-18 16:19:46 +07:00
parent 9f7a73e149
commit 518d6ff427
2 changed files with 10 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ const getAllNotificationErrorLogDb = async () => {
b.contact_name,
b.contact_type
FROM notification_error_log a
LEFT JOIN contact b ON a.contact_id = b.contact_id
LEFT JOIN contact b ON a.contact_phone = b.contact_phone
WHERE a.deleted_at IS NULL
ORDER BY a.notification_error_log_id DESC
`;
@@ -22,7 +22,7 @@ const getNotificationErrorLogByIdDb = async (id) => {
b.contact_name,
b.contact_type
FROM notification_error_log a
LEFT JOIN contact b ON a.contact_id = b.contact_id
LEFT JOIN contact b ON a.contact_phone = b.contact_phone
WHERE a.notification_error_log_id = $1 AND a.deleted_at IS NULL
`;
const result = await pool.query(queryText, [id]);
@@ -36,7 +36,7 @@ const getNotificationErrorLogByNotificationErrorIdDb = async (notificationErrorI
b.contact_name,
b.contact_type
FROM notification_error_log a
LEFT JOIN contact b ON a.contact_id = b.contact_id
LEFT JOIN contact b ON a.contact_phone = b.contact_phone
WHERE a.notification_error_id = $1 AND a.deleted_at IS NULL
ORDER BY a.created_at DESC
`;