This commit is contained in:
Alex Holliday committed 2026-01-22 20:57:45 +00:00
1 parent e6c268f14e
commit 995ae5252d
1 file changed
+2 -10
@@ -92,11 +92,7 @@ class MongoMonitorsRepository implements IMonitorsRepository {
$lookup: {
from: "checks",
let: { monitorId: "$_id" },
pipeline: [
{ $match: { $expr: { $eq: ["$metadata.monitorId", "$$monitorId"] } } },
{ $sort: { createdAt: -1 } },
{ $limit: checksCount },
],
pipeline: [{ $match: { $expr: { $eq: ["$metadata.monitorId", "$$monitorId"] } } }, { $sort: { createdAt: -1 } }, { $limit: checksCount }],
as: "checks",
},
},
@@ -126,11 +122,7 @@ class MongoMonitorsRepository implements IMonitorsRepository {
$or: [
"$$value",
{
$and: [
{ $eq: ["$$this.active", true] },
{ $lte: ["$$this.start", "$$NOW"] },
{ $gte: ["$$this.end", "$$NOW"] },
],
$and: [{ $eq: ["$$this.active", true] }, { $lte: ["$$this.start", "$$NOW"] }, { $gte: ["$$this.end", "$$NOW"] }],
},
],
},