|
|
@ -88,7 +88,8 @@ async function deleteOldRecords() {
|
|
|
|
exports.addTanks = async (req, reply) => {
|
|
|
|
exports.addTanks = async (req, reply) => {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const customerId = req.params.customerId;
|
|
|
|
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
|
|
|
|
// Check if the combination of hardwareId and tankhardwareId already exists
|
|
|
|
const existingTank = await Tank.findOne({
|
|
|
|
const existingTank = await Tank.findOne({
|
|
|
|