made changes in customer id and changed tank location to lower case while creating them

master
varun 3 years ago
parent 4d22f4605b
commit 9db0671b49

@ -35,7 +35,7 @@ console.log(req.params);
capacity: req.body.capacity,
typeOfWater: req.body.typeOfWater,
tankLocation:req.body.tankLocation,
tankLocation:(req.body.tankLocation).toLowerCase(),
};
var tank_name = req.body.tankName
@ -58,7 +58,7 @@ console.log(req.params);
tank.capacity = usertobeInserted.capacity;
tank.typeOfWater = usertobeInserted.typeOfWater;
tank.tankLocation = usertobeInserted.tankLocation;
tank.tankLocation = (usertobeInserted.tankLocation).toLowerCase();
}
}
const insertedTank = await tank.save();

@ -168,7 +168,7 @@ exports.addUser = async (req, reply) => {
// await resetCounter();//to set customer id back to 0
var c_id = await generateCustomerId()
var building= ((req.body.buildingName).slice(0, 3)).toUpperCase();
var customer_id = `AWS${building}${c_id}`
var customer_id = `AWSU${building}${c_id}`
// console.log("This is the reply in the handler after the validations", reply);
userData = {
customerId: customer_id,

Loading…
Cancel
Save