master^2
Bhaskar 8 months ago
parent 7145831d8f
commit e3fffb8ab9

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

Loading…
Cancel
Save