From 436ea1cf8914a084fa8bc3c00f6280503e4d99ba Mon Sep 17 00:00:00 2001 From: mhmmdafif Date: Fri, 9 Jan 2026 14:30:07 +0700 Subject: [PATCH] replace created at in notif error --- db/notification_error.db.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/notification_error.db.js b/db/notification_error.db.js index 2f35a5c..561f68d 100644 --- a/db/notification_error.db.js +++ b/db/notification_error.db.js @@ -95,7 +95,8 @@ const getAllNotificationDb = async (searchParams = {}) => { ], queryParams ); - if (whereParamAnd) queryParams = whereParamAnd; + + queryParams = whereParamAnd ? whereParamAnd : queryParams; const queryText = ` SELECT @@ -108,12 +109,12 @@ const getAllNotificationDb = async (searchParams = {}) => { a.is_delivered, a.is_read, a.is_active, + a.created_at, b.error_code, b.error_code_name, b.error_code_color, b.path_icon, - b.created_at, c.solution_name, c.type_solution,