Skip to content

fix(api): add limit/offset pagination and caps to list endpoints (#63) - #67

Open
ghzhost wants to merge 1 commit into
MergeFi:mainfrom
ghzhost:fix/63-list-endpoints-pagination
Open

fix(api): add limit/offset pagination and caps to list endpoints (#63)#67
ghzhost wants to merge 1 commit into
MergeFi:mainfrom
ghzhost:fix/63-list-endpoints-pagination

Conversation

@ghzhost

@ghzhost ghzhost commented Aug 16, 2026

Copy link
Copy Markdown

Summary

Resolves #63.

Adds standard, bounded limit and offset pagination to the primary resource listing endpoints (GET /bounties, GET /milestones, GET /maintenance-pools, GET /users).

Changes

  • Introduced PaginationQueryDto with @Min(1), @Max(100), and default limit = 20, offset = 0.
  • Introduced ListBountiesDto extending pagination query with optional status filter.
  • Updated controllers & services for bounties, milestones, maintenance-pool, and users to use findAndCount with take/skip and return { data, total, limit, offset, hasMore }.
  • Added unit test suites verifying default limits, max limit clamping (caps at 100), and hasMore pagination calculation.

Acceptance Criteria

  • GET /bounties, GET /milestones, GET /maintenance-pools, and GET /users accept and apply limit/offset.
  • Enforced max page size of 100 prevents unbounded queries.
  • Unit test suites verify pagination bounding and metadata calculation.
  • Audited callers: no internal services call list() directly.

@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bounty/Milestone/MaintenancePool/User list endpoints have no pagination and return the entire table in one unbounded response

1 participant