Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions services/hexathons/src/routes/hexathon-users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ hexathonUserRouter.route("/:hexathonId/users").get(
const offset = parseInt(req.query.offset as string) || 0;
const hexathonUsers = await HexathonUserModel.accessibleBy(req.ability)
.find(filter)
.sort({ "points.numCollected": 'desc', name: 'asc' })
Copy link

Copilot AI Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a database index on points.numCollected and name fields to optimize this sorting operation, especially if this endpoint will be frequently accessed for leaderboard functionality.

Copilot uses AI. Check for mistakes.
.skip(offset)
.limit(limit);

Expand Down