Skip to content

Commit

Permalink
temporarily disable pagination for admin users search api
Browse files Browse the repository at this point in the history
  • Loading branch information
shadrach-tayo committed Jan 15, 2025
1 parent 6ededac commit 56727a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion desci-server/src/controllers/admin/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ export const searchUserProfiles = async (req: SearchProfilesRequest, res: Respon
logger.trace({ page, cursor, limit, search });

const count = await prisma.user.count({});
const users = await prisma.user.findMany({ cursor: { id: cursor }, skip: page * limit, take: limit });
// const users = await prisma.user.findMany({ cursor: { id: cursor }, skip: page * limit, take: limit });
const users = await prisma.user.findMany({
select: { id: true, email: true, name: true, orcid: true, isAdmin: true, createdAt: true },
});

new SuccessResponse({ cursor: users[users.length - 1].id, page, count, data: users }).send(res);
return;
Expand Down

0 comments on commit 56727a2

Please sign in to comment.