format
This commit is contained in:
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"] }],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user