added field in tankschema,made changes in tank routes and tank controllers,updated connections

master
varun 3 years ago
parent bf223c5120
commit d6ec8e903b

@ -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;
}
}

@ -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 },

@ -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" },
},
},

Loading…
Cancel
Save