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