|
|
@ -2758,10 +2758,10 @@ exports.getDisconnectedCustomerDetails = async (req, reply) => {
|
|
|
|
const user = customers.find(u => u.customerId === sensor.customerId);
|
|
|
|
const user = customers.find(u => u.customerId === sensor.customerId);
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
hardwareId: sensor.hardwareId,
|
|
|
|
// hardwareId: sensor.hardwareId,
|
|
|
|
masterName: sensor.masterName,
|
|
|
|
// masterName: sensor.masterName,
|
|
|
|
location: sensor.location,
|
|
|
|
// location: sensor.location,
|
|
|
|
disconnectedAt: sensor.disconnectedAt || new Date().toISOString(),
|
|
|
|
// disconnectedAt: sensor.disconnectedAt || new Date().toISOString(),
|
|
|
|
customer: user ? {
|
|
|
|
customer: user ? {
|
|
|
|
customerId: user.customerId,
|
|
|
|
customerId: user.customerId,
|
|
|
|
username: user.username || "",
|
|
|
|
username: user.username || "",
|
|
|
@ -2800,7 +2800,7 @@ exports.getDisconnectedCustomerDetails = async (req, reply) => {
|
|
|
|
|
|
|
|
|
|
|
|
return reply.send({
|
|
|
|
return reply.send({
|
|
|
|
status_code: 200,
|
|
|
|
status_code: 200,
|
|
|
|
disconnectedIssues: response
|
|
|
|
data: response
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|