From 8c8238e8e2076d12670c69518cbf0fd6b9021a85 Mon Sep 17 00:00:00 2001 From: Ricardo Garim Date: Mon, 14 Oct 2024 16:41:24 -0300 Subject: [PATCH] chore: remove nameInsensitive sorting on /v1/users.listByStatus (#33401) --- apps/meteor/app/api/server/lib/users.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/meteor/app/api/server/lib/users.ts b/apps/meteor/app/api/server/lib/users.ts index 0289f1fe5ff5..164ea8c2b747 100644 --- a/apps/meteor/app/api/server/lib/users.ts +++ b/apps/meteor/app/api/server/lib/users.ts @@ -147,9 +147,6 @@ export async function findPaginatedUsersByStatus({ if (sort?.status) { actualSort.active = sort.status; } - if (sort?.name) { - actualSort.nameInsensitive = sort.name; - } const match: Filter> = {}; switch (status) { case 'active': @@ -198,6 +195,7 @@ export async function findPaginatedUsersByStatus({ if (roles?.length && !roles.includes('all')) { match.roles = { $in: roles }; } + const { cursor, totalCount } = await Users.findPaginated( { ...match,