diff --git a/src/controllers/departmentController.js b/src/controllers/departmentController.js index b521787d..0e38bcf2 100644 --- a/src/controllers/departmentController.js +++ b/src/controllers/departmentController.js @@ -134,7 +134,8 @@ const generateDepartmentId = async (city, departmentName) => { pincode, createdBy, updatedBy, - email + email, + nameoftheContactPerson } = request.body; // Generate departmentId based on departmentName @@ -163,6 +164,7 @@ const generateDepartmentId = async (city, departmentName) => { country, pincode, email, + nameoftheContactPerson, // departmentName, createdBy, updatedBy, diff --git a/src/models/Department.js b/src/models/Department.js index ce78d5f9..41386723 100644 --- a/src/models/Department.js +++ b/src/models/Department.js @@ -53,7 +53,8 @@ const citySchema = new mongoose.Schema( city: { type: String }, location: [{ type : String}], state: String, - country: String, + country: String, + nameoftheContactPerson: String, services: { password: { bcrypt: String } }, createdAt: { type: Date, diff --git a/src/routes/departmentRoute.js b/src/routes/departmentRoute.js index d0049607..49082a0a 100644 --- a/src/routes/departmentRoute.js +++ b/src/routes/departmentRoute.js @@ -507,6 +507,7 @@ module.exports = function (fastify, opts, next) { address2: { type: "string" }, zone: { type: "string" }, pincode: { type: "string" }, + nameoftheContactPerson: { type: "string"} //departmentName: { type: "string" }, }, },