Compare commits

..

2 Commits

Author SHA1 Message Date
bf9cdf5eeb add: props register 2025-10-16 07:53:50 +07:00
d56d23cd71 fix: query device_status to is_active 2025-10-16 07:52:41 +07:00
2 changed files with 6 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ const getAllDevicesDb = async (searchParams = {}) => {
{ column: "a.device_code", param: searchParams.code, type: "string" }, { column: "a.device_code", param: searchParams.code, type: "string" },
{ column: "a.device_location", param: searchParams.location, type: "string" }, { column: "a.device_location", param: searchParams.location, type: "string" },
{ column: "b.brand_name", param: searchParams.brand, type: "string" }, { column: "b.brand_name", param: searchParams.brand, type: "string" },
{ column: "a.device_status", param: searchParams.status, type: "string" }, { column: "a.is_active", param: searchParams.status, type: "string" },
], ],
queryParams queryParams
); );
@@ -44,7 +44,7 @@ const getAllDevicesDb = async (searchParams = {}) => {
a.device_id, a.device_id,
a.device_code, a.device_code,
a.device_name, a.device_name,
a.device_status, a.is_active,
a.device_location, a.device_location,
a.device_description, a.device_description,
a.ip_address, a.ip_address,
@@ -81,7 +81,7 @@ const getDeviceByIdDb = async (id) => {
SELECT SELECT
a.device_id, a.device_id,
a.device_name, a.device_name,
a.device_status, a.is_active,
a.device_location, a.device_location,
a.device_description, a.device_description,
a.ip_address, a.ip_address,

View File

@@ -29,6 +29,9 @@ class AuthService {
user_email: data.user_email, user_email: data.user_email,
user_phone: data.user_phone, user_phone: data.user_phone,
user_password: hashedPassword, user_password: hashedPassword,
is_sa: 0,
is_active: 1,
is_approve: 1,
}); });
const newUser = { const newUser = {