|
|
|
@ -90,7 +90,7 @@ exports.addTanks = async (req, reply) => {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
const customerId = req.params.customerId;
|
|
|
|
|
const { hardwareId, tankhardwareId,tankName,tankLocation } = req.body;
|
|
|
|
|
const { hardwareId, tankhardwareId,tankName,tankLocation,need_sensor,blockName } = req.body;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const existingTank = await Tank.findOne({
|
|
|
|
@ -98,7 +98,8 @@ exports.addTanks = async (req, reply) => {
|
|
|
|
|
hardwareId: hardwareId,
|
|
|
|
|
tankhardwareId: tankhardwareId,
|
|
|
|
|
tankName:tankName,
|
|
|
|
|
tankLocation:tankLocation.toLowerCase()
|
|
|
|
|
tankLocation:tankLocation.toLowerCase(),
|
|
|
|
|
blockName:blockName
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (existingTank) {
|
|
|
|
@ -119,7 +120,8 @@ exports.addTanks = async (req, reply) => {
|
|
|
|
|
waterCapacityPerCm:req.body.waterCapacityPerCm,
|
|
|
|
|
height:req.body.height,
|
|
|
|
|
length:req.body.length,
|
|
|
|
|
width:req.body.width
|
|
|
|
|
width:req.body.width,
|
|
|
|
|
need_sensor:req.body.need_sensor
|
|
|
|
|
|
|
|
|
|
// ... other fields
|
|
|
|
|
};
|
|
|
|
|