diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index eaabbe0a..3c70347a 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -25,6 +25,7 @@ console.log(req.params); blockName: req.body.blockName, capacity: req.body.capacity, typeOfWater: req.body.typeOfWater, + type: req.body.type, tankLocation:req.body.tankLocation, }; var tank_name = req.body.tankName @@ -44,6 +45,7 @@ console.log(req.params); tank.blockName = usertobeInserted.blockName; tank.capacity = usertobeInserted.capacity; tank.typeOfWater = usertobeInserted.typeOfWater; + tank.typer = usertobeInserted.type; tank.tankLocation = usertobeInserted.tankLocation; } } diff --git a/src/models/tanks.js b/src/models/tanks.js index 0680feb1..b8acac55 100644 --- a/src/models/tanks.js +++ b/src/models/tanks.js @@ -15,6 +15,7 @@ const tanksSchema = new mongoose.Schema({ blockName: { type: String, default: null }, capacity: { type: String, default: null }, typeOfWater: { type: String, default: null }, + type: { type: String, default: null }, tankLocation: { type: String, default: null }, diff --git a/src/routes/tanksRoute.js b/src/routes/tanksRoute.js index 92ff6409..fc036206 100644 --- a/src/routes/tanksRoute.js +++ b/src/routes/tanksRoute.js @@ -17,6 +17,7 @@ module.exports = function (fastify, opts, next) { blockName: { type: "string"}, capacity: { type: "string" }, typeOfWater: { type: "string" }, + type: { type: "string" }, tankLocation: { type: "string" }, }, },