From 99fb76b48882285629238b90e79966fa5569edb3 Mon Sep 17 00:00:00 2001 From: varun Date: Tue, 8 Aug 2023 05:45:30 -0400 Subject: [PATCH] made changes in tank --- src/controllers/tanksController.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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({