From 1025bf40fa8ce5c880016ceb054bb178cf61c8eb Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Mon, 18 Aug 2025 13:47:12 +0530 Subject: [PATCH] officeName and city added --- src/models/Department.js | 2 ++ src/routes/installationRoute.js | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/models/Department.js b/src/models/Department.js index 3db20634..33eb70b7 100644 --- a/src/models/Department.js +++ b/src/models/Department.js @@ -152,6 +152,8 @@ const citySchema = new mongoose.Schema( alternativePhone: { type: String }, departmentId: String, // new departmentName: String, + officeName: String, // new + city: String, } ], diff --git a/src/routes/installationRoute.js b/src/routes/installationRoute.js index 2d6bc8e1..a1160b2e 100644 --- a/src/routes/installationRoute.js +++ b/src/routes/installationRoute.js @@ -26,6 +26,8 @@ module.exports = function (fastify, opts, next) { alternativePhone: { type: "string" }, email: { type: "string" }, status: { type: "string" }, + officeName: { type: "string" }, + city: { type: "string" }, }, }, }, @@ -76,7 +78,7 @@ fastify.get("/api/getAllDepartments/:officeName/:city", { description: "Department ID to fetch team members from" } }, - + required: ["departmentId"] }, },