|
|
|
@ -815,6 +815,8 @@ exports.mastrerList = async (req, reply) => {
|
|
|
|
|
return reply.status(404).send({ success: false, message: "No tanks found for this customer" });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const {tankLocation,typeOfWater} = tanks
|
|
|
|
|
//console.log(tanks)
|
|
|
|
|
// Step 3: Extract hardwareId from tanks
|
|
|
|
|
const hardwareIds = tanks.map(tank => tank.hardwareId);
|
|
|
|
|
|
|
|
|
@ -829,7 +831,7 @@ exports.mastrerList = async (req, reply) => {
|
|
|
|
|
return reply.status(404).send({ success: false, message: "No master tanks found" });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return reply.send({ success: true, buildingName, data: masterTanks, user });
|
|
|
|
|
return reply.send({ success: true,tankLocation,typeOfWater ,buildingName, data: masterTanks, user });
|
|
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error("Error fetching master tanks:", error);
|
|
|
|
|