refactor networkSerivce.getMonitorsByTeamId to take a config objet
This commit is contained in:
1 parent
cab023709b
commit
4748afb93a
5 files changed
+74
-58
No files matched your search
@@ -359,8 +359,10 @@ const getMonitorsByTeamId = async (req, res) => {
|
||||
field,
|
||||
order,
|
||||
} = req.query || {};
|
||||
|
||||
const monitorQuery = { teamId: req.params.teamId, type };
|
||||
const monitorQuery = { teamId: req.params.teamId };
|
||||
if (type !== undefined) {
|
||||
monitorQuery.type = type;
|
||||
}
|
||||
// Add filter if provided
|
||||
// $options: "i" makes the search case-insensitive
|
||||
if (filter !== undefined) {
|
||||
|
||||
Reference in new issue
Block a user