Fix popular courses match stage

This commit is contained in:
aeroreyna
2022-02-16 22:40:21 -08:00
parent e0c6470bce
commit 58fda40c20
2 changed files with 2 additions and 2 deletions

View File

@@ -71,7 +71,7 @@ userDB = (DB) => {
DB.getPopularGroups = async (limit = 10) => {
return DB.profileCols.aggregate([
{
$match: {isGroup: true, isPrivate: false, isCourse: false}
$match: {isGroup: true, isPrivate: {$ne: true}, isCourse: {$ne: true}}
},
{
$addFields: { subscribed_count: {$size: { "$ifNull": [ {"$objectToArray" : "$subscribed"}, [] ] } } }