Repository navigation
fix(admin): return pagination totals for user lists - #21540
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Return and test user totals internal/admin/service.go, internal/admin/service_ee.go, internal/admin/handler.go, internal/admin/user_detail_test.go |
The open-source service returns the total from userDAO.List. The Enterprise Edition service returns a count of zero. The handler returns the count with the user results. Tests check page counts and an empty-list total. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested labels: testing, go
Suggested reviewers: buua436
Merge Risk: 
Minimal · up to 864a1
-
User-list responses include pagination totals; no merge-blocking issue was found in the current request path.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 4 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
A rabbit counts each page with care
Ten hop in, then two are there
The empty list reports a zero
Totals travel where results go
The rabbit checks, then bounds away
Comment @coderabbitai help to get the list of available commands.
GET /api/v1/admin/userspaginates results on the backend but omits the total count, preventing the frontend from calculating the number of pages.Pass the existing DAO count through the service to the handler and expose it as a top-level
total, preserving thedataarray. Update the shared handler and EE stub signature to support an pagination total from EE user lists.