donwgrade mongo functoins

This commit is contained in:
Alex Holliday committed 2025-06-25 11:39:05 +08:00
1 parent 6c7fefe4ed
commit 8606b5e5de
5 files changed
+23 -30

No files matched your search

+4 -14
View File
@@ -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,
},
},
]);