diff --git a/server/src/repositories/monitors/MongoMonitorsRepository.ts b/server/src/repositories/monitors/MongoMonitorsRepository.ts index 00d921e18..5ce029634 100644 --- a/server/src/repositories/monitors/MongoMonitorsRepository.ts +++ b/server/src/repositories/monitors/MongoMonitorsRepository.ts @@ -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"] }], }, ], },