diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 95cfcee2..bd1a8858 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -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(); diff --git a/src/controllers/userController.js b/src/controllers/userController.js index a147bc89..0e52cae9 100644 --- a/src/controllers/userController.js +++ b/src/controllers/userController.js @@ -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,