|
|
@ -858,6 +858,7 @@ exports.getAllOfficesByCity = async (req, reply) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const cityRegex = new RegExp(city.trim(), "i");
|
|
|
|
const cityRegex = new RegExp(city.trim(), "i");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 🔹 Step 1: Find all headOffices in this city
|
|
|
|
// 🔹 Step 1: Find all headOffices in this city
|
|
|
|
const headOffices = await City.find({ city: cityRegex }).lean();
|
|
|
|
const headOffices = await City.find({ city: cityRegex }).lean();
|
|
|
|