Skip to content

Commit 9f13112

Browse files
committed
remove old visits and seminars from TBA check
1 parent c007289 commit 9f13112

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

server/controllers/processes/sanityCheck.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ router.get('/', async (req, res) => {
131131
const seminarsTBA = await Seminar.aggregate([
132132
{
133133
$match: {
134-
$expr: { $lt: [{ $strLenCP: { $ifNull: ["$title", ""] } }, 5] }
134+
$and: [
135+
{ $expr: { $lt: [{ $strLenCP: { $ifNull: ["$title", ""] } }, 5] } },
136+
{ startDatetime: { $gt: new Date("2025-01-01T00:00:00.000Z") } }
137+
]
135138
}
136139
}
137140
]);
@@ -141,7 +144,8 @@ router.get('/', async (req, res) => {
141144
$match: {
142145
$and: [
143146
{ $expr: { $lt: [{ $strLenCP: { $ifNull: ["$collaborationTheme", ""] } }, 5] } },
144-
{ collaborationTheme: { $exists: true } }
147+
{ collaborationTheme: { $exists: true } },
148+
{ startDate: { $gt: new Date("2025-01-01T00:00:00.000Z") } }
145149
]
146150
}
147151
}

0 commit comments

Comments
 (0)