fix: removing unused code blocks and better handling for filter param

This commit is contained in:
Amol committed 2025-06-15 03:17:22 +05:30
1 parent e366741aa9
commit 91741c2ae5
3 files changed
+1 -5

No files matched your search

-3
View File
@@ -523,9 +523,6 @@ const getMonitorsByTeamId = async (req) => {
if (type !== undefined) {
matchStage.type = Array.isArray(type) ? { $in: type } : type;
}
if (field === undefined) {
matchStage.name = { $regex: filter, $options: "i" };
}
const summaryResult = await Monitor.aggregate(
buildMonitorSummaryByTeamIdPipeline({ matchStage })