Skip to content

Commit f403d3f

Browse files
committed
fix(users): fetch roles after users to limit concurrent DB connections
1 parent 9cf31e5 commit f403d3f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

app/(authenticated)/users/page.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ async function UsersContent() {
2525
redirect("/");
2626
}
2727

28-
const [users, distinctRoles] = await Promise.all([
29-
listUsersWithEmails(),
30-
listDistinctProfileRoles(),
31-
]);
28+
const users = await listUsersWithEmails();
29+
const distinctRoles = await listDistinctProfileRoles();
3230

3331
const roleFilterOptions: { value: string; label: string }[] = [
3432
{ value: "all", label: "All Roles" },

0 commit comments

Comments
 (0)