From 7364c3b9c167462feab7750ac79246da8bbf9f28 Mon Sep 17 00:00:00 2001 From: Antony Kurniawan Date: Thu, 16 Oct 2025 12:29:47 +0700 Subject: [PATCH] add: column query device _id --- db/device.db.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/device.db.js b/db/device.db.js index 4c429bb..c5373a7 100644 --- a/db/device.db.js +++ b/db/device.db.js @@ -32,7 +32,8 @@ const getAllDevicesDb = async (searchParams = {}) => { queryParams = whereParamAnd ? whereParamAnd : queryParams; const queryText = ` - SELECT COUNT(*) OVER() AS total_data, + SELECT COUNT(*) OVER() AS total_data, + a.device_id, a.device_status, a.device_location, a.device_description, @@ -69,7 +70,8 @@ const getAllDevicesDb = async (searchParams = {}) => { const getDeviceByIdDb = async (id) => { const queryText = ` - SELECT + SELECT + a.device_id, a.device_status, a.device_location, a.device_description,