master^2
Bhaskar 6 months ago
parent 5825091517
commit b576a853df

@ -1213,6 +1213,8 @@ exports.getIotDataByCustomer = async (req, reply) => {
return { return {
tankhardwareId, tankhardwareId,
tankName: sensor.tankName ?? null,
tankLocation: sensor.tankLocation ?? null,
masterName: sensor.masterName ?? null, masterName: sensor.masterName ?? null,
location: sensor.location ?? null, location: sensor.location ?? null,
loraMessage, loraMessage,
@ -1223,12 +1225,10 @@ exports.getIotDataByCustomer = async (req, reply) => {
return { return {
hardwareId, hardwareId,
message, message,
// gsmDate: latestRecord?.date,
masterName: relatedSensors[0]?.masterName ?? null, masterName: relatedSensors[0]?.masterName ?? null,
location: relatedSensors[0]?.location ?? null, location: relatedSensors[0]?.location ?? null,
tanks: tanksStatus tanks: tanksStatus
}; };
}); });
const iotDataGrouped = await Promise.all(latestDataPromises); const iotDataGrouped = await Promise.all(latestDataPromises);

Loading…
Cancel
Save