From e3fffb8ab9614d54276034c5c8adc098a5dfc203 Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Tue, 4 Feb 2025 14:53:21 +0530 Subject: [PATCH] chnages --- src/controllers/departmentController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/departmentController.js b/src/controllers/departmentController.js index 3346f539..e1cecc4a 100644 --- a/src/controllers/departmentController.js +++ b/src/controllers/departmentController.js @@ -739,7 +739,7 @@ exports.addDepartment = async (request, reply) => { const getLocationsByCityAndZone = async (city, zone) => { try { - const result = await City.aggregate([ + const result = await Branch.aggregate([ { $project: { city: { $toLower: { $trim: { input: "$city" } } }, // Normalize city name (lowercase & trim) @@ -876,7 +876,7 @@ exports.getZonebasedLocations = async (req, reply) => { const getZonesByCitys = async (city) => { try { - const result = await City.aggregate([ + const result = await Branch.aggregate([ { $project: { city: { $trim: { input: "$city" } }, // Trim city field in DB