perf(settlement,rating): paginate 3 unbounded list endpoints (M10-M12)
- M10 GET /settlement: was unbounded; add page/limit + countByUser + data.meta.
- M11 GET /admin/comments/pending: paginate findPending + countPending.
- M12 GET /comments/{doctor}: paginate the fetch-joined roots query via
Paginator(fetchJoinCollection) + countApprovedRootsByDoctor.
All keep the existing { data: { data: [...] } } envelope and add data.meta
(backward compatible). Default limit 50 / max 100.
Regressions: SettlementListPaginationTest, CommentPaginationTest (both fail
without the limits). Also de-flaked SendCodeMobileRateLimitTest (randomised the
IP block so the persistent per-IP limiter buckets don't accumulate across runs).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -141,10 +141,12 @@ Request a settlement (withdrawal from wallet to bank account).
|
||||
|
||||
## GET `/api/v1/settlement`
|
||||
|
||||
Get authenticated user's settlement requests.
|
||||
Get authenticated user's settlement requests (paginated, newest first).
|
||||
|
||||
**Permission:** `AUTH`
|
||||
|
||||
> **صفحهبندی:** `?page` و `?limit` (پیشفرض ۵۰، حداکثر ۱۰۰). پاسخ علاوه بر `data.data` یک `data.meta` (`totalRecords`/`totalPages`/`currentPage`) دارد؛ پاکت قبلی دستنخورده است.
|
||||
|
||||
### Response `200`
|
||||
```json
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user