mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: rename numberOfCompletedQuests to score
This commit is contained in:
1 parent
196187d5c9
commit
1a5655d7ce
2 files changed
+4
-4
No files matched your search
@@ -45,15 +45,15 @@ export function leaderboard() {
|
||||
},
|
||||
{
|
||||
$addFields: {
|
||||
numberOfCompletedQuests: { $size: '$completedQuests' }, // Calculate the size of the completedQuests array
|
||||
score: { $size: '$completedQuests' }, // Calculate the size of the completedQuests array
|
||||
},
|
||||
},
|
||||
{
|
||||
$match: {
|
||||
numberOfCompletedQuests: { $gt: 0 }, // Filter out users who haven't completed any quests
|
||||
score: { $gt: 0 }, // Filter out users who haven't completed any quests
|
||||
},
|
||||
},
|
||||
{ $sort: { numberOfCompletedQuests: -1 } },
|
||||
{ $sort: { score: -1 } },
|
||||
{
|
||||
$lookup: {
|
||||
from: 'users',
|
||||
|
||||
Reference in new issue
Block a user