From de8622805b4b6270c345cdcda76b1cb81accbbdf Mon Sep 17 00:00:00 2001 From: crystaltine Date: Fri, 26 Sep 2025 23:28:14 -0400 Subject: [PATCH] add .sort by points.numCollected in /:hexathonId/users route --- services/hexathons/src/routes/hexathon-users.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/services/hexathons/src/routes/hexathon-users.ts b/services/hexathons/src/routes/hexathon-users.ts index 0a5595d..35001ce 100644 --- a/services/hexathons/src/routes/hexathon-users.ts +++ b/services/hexathons/src/routes/hexathon-users.ts @@ -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' }) .skip(offset) .limit(limit);