donwgrade mongo functoins
This commit is contained in:
1 parent
6c7fefe4ed
commit
8606b5e5de
5 files changed
+23
-30
No files matched your search
@@ -134,6 +134,9 @@ const getStatusPage = async (url) => {
|
||||
},
|
||||
},
|
||||
},
|
||||
{ $match: { "monitors.orderIndex": { $ne: -1 } } },
|
||||
{ $sort: { "monitors.orderIndex": 1 } },
|
||||
|
||||
{
|
||||
$group: {
|
||||
_id: "$_id",
|
||||
@@ -156,20 +159,7 @@ const getStatusPage = async (url) => {
|
||||
showAdminLoginLink: 1,
|
||||
url: 1,
|
||||
},
|
||||
monitors: {
|
||||
$filter: {
|
||||
input: {
|
||||
$sortArray: {
|
||||
input: "$monitors",
|
||||
sortBy: { orderIndex: 1 },
|
||||
},
|
||||
},
|
||||
as: "monitor",
|
||||
cond: {
|
||||
$ne: ["$$monitor.orderIndex", -1],
|
||||
},
|
||||
},
|
||||
},
|
||||
monitors: 1,
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user