diff --git a/src/controllers/departmentController.js b/src/controllers/departmentController.js index c360464a..d36e60bd 100644 --- a/src/controllers/departmentController.js +++ b/src/controllers/departmentController.js @@ -236,6 +236,7 @@ exports.getAllDepartmentsParticularFields = async (req, reply) => { address2, pincode, desginationName, + location, createdBy, updatedBy, } = request.body; @@ -271,6 +272,7 @@ exports.getAllDepartmentsParticularFields = async (req, reply) => { country, pincode, desginationName, + location, createdBy, updatedBy, }); diff --git a/src/models/Department.js b/src/models/Department.js index bbc11383..8adfabb2 100644 --- a/src/models/Department.js +++ b/src/models/Department.js @@ -44,6 +44,7 @@ const departmentSchema = new mongoose.Schema( desginationName: { type: String }, phone: { type: String, unique: true, trim: true }, reportingManager : { type: String }, + location: [{ type : String}], firstName : { type: String }, lastName: { type: String }, email: { type: String }, diff --git a/src/routes/departmentRoute.js b/src/routes/departmentRoute.js index fbca1e0e..4864c73f 100644 --- a/src/routes/departmentRoute.js +++ b/src/routes/departmentRoute.js @@ -25,7 +25,7 @@ module.exports = function (fastify, opts, next) { address2: { type: "string" }, zone: { type: "string" }, pincode: { type: "string" }, - departmentName: { type: "string" }, + //departmentName: { type: "string" }, }, }, security: [ @@ -178,6 +178,10 @@ module.exports = function (fastify, opts, next) { lastName: { type: "string" }, reportingManager: { type: "string" }, email: { type: "string" }, + location: { + type: "array", + items: { type: "string" }, + }, }, }, security: [