🐛 Fix pagination on register token page
This commit is contained in:
1 parent
129fd1336c
commit
71757d0cce
2 files changed
+49
-21
No files matched your search
@@ -26,12 +26,15 @@ export const inviteRouter = createTRPCRouter({
|
||||
nextCursor = nextItem!.id;
|
||||
}
|
||||
|
||||
const countRegistrationTokens = await ctx.prisma.registrationToken.count();
|
||||
|
||||
return {
|
||||
registrationTokens: registrationTokens.map((token) => ({
|
||||
id: token.id,
|
||||
expires: token.expires,
|
||||
})),
|
||||
nextCursor,
|
||||
countPages: Math.ceil(countRegistrationTokens / limit)
|
||||
};
|
||||
}),
|
||||
createRegistrationToken: publicProcedure
|
||||
|
||||
Reference in new issue
Block a user