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,