feat: allow admin to assign multiple counties to users
This commit is contained in:
@@ -90,6 +90,14 @@ export async function listRts(
|
||||
});
|
||||
}
|
||||
|
||||
if (user.counties && user.counties.length > 0) {
|
||||
filterObj.push({
|
||||
county: {
|
||||
$in: user.counties.map((item) => new mongoose.Types.ObjectId(item)),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
let { taggedFilter, taggedUserFilterIndex } = getTaggedUsersFilter(
|
||||
filterObj,
|
||||
sortObj
|
||||
|
||||
Reference in New Issue
Block a user