diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index d98e0471..d3e626f6 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -88,7 +88,8 @@ async function deleteOldRecords() { exports.addTanks = async (req, reply) => { try { const customerId = req.params.customerId; - const { hardwareId, tankhardwareId } = req.body; + const { hardwareId, tankhardwareId,tankName,tankLocation } = req.body; + // Check if the combination of hardwareId and tankhardwareId already exists const existingTank = await Tank.findOne({