feat: add search and cursor based pagination to userAdminRouter.list - #30026
feat: add search and cursor based pagination to userAdminRouter.list#30026SinghaAnirban005 wants to merge 2 commits into
Conversation
|
Welcome to Cal.diy, @SinghaAnirban005! Thanks for opening this pull request. A few things to keep in mind:
A maintainer will review your PR soon. Thanks for contributing! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe user admin listing endpoint now validates pagination and search inputs. It uses the user repository for search and cursor-based pagination. The response contains user rows, the next cursor, and total-row metadata. Tests cover authenticated setup, default pagination, search-term handling, cursor and limit forwarding, row mapping, and response metadata. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What does this PR do?
This PR resolves the
TODO: Add search, pagination, etc.inuserAdminRouter.list(packages/trpc/server/routers/viewer/users/_router.ts), which previously calledprisma.user.findMany()unfiltered and unpaginated fetching all users on every call.Mandatory Tasks (DO NOT REMOVE)