made changes in tanks

master
varun 2 years ago
parent 3f8db59d33
commit 1ae52c4723

@ -100,9 +100,10 @@ exports.updateTanksInfo = async (req, reply) => {
//delete selected tank //delete selected tank
exports.deleteTanksInfo = async (req, reply) => { exports.deleteTanksInfo = async (req, reply) => {
try { try {
var customerId = req.params.customerId; const customerId = req.params.customerId;
var tankName = req.query.tankName; const tankName = req.query.tankName;
const tank = await Tank.findOneAndDelete({ tankName: tankName,customerId:customerId,tankLocation:req.body.tankLocation.toLowerCase() }); const tankLocation = req.body.tankLocation.toLowerCase();
const tank = await Tank.findOneAndDelete({ tankName: tankName,customerId:customerId,tankLocation:tankLocation });
reply.send({ status_code: 200, data: tank}); reply.send({ status_code: 200, data: tank});
// return tank; // return tank;

Loading…
Cancel
Save