Description: The GET /users endpoint (and future list endpoints) returns all records without pagination or filtering. This will cause performance issues as data grows. Implement cursor- or offset-based pagination.
Tasks:
- Create a shared
PaginationDto with page, limit, and sortBy fields
- Apply pagination to
UsersService.findAll() using TypeORM take/skip
- Return a paginated response envelope:
{ data, total, page, limit }
- Add optional filtering (e.g., search by email) via query parameters
- Document pagination parameters in Swagger
Acceptance Criteria:
- List endpoints accept
page and limit query params
- Response includes total count and current page metadata
- Default limit is enforced (e.g., max 100 records per page)
ETA: 1 day
Description: The
GET /usersendpoint (and future list endpoints) returns all records without pagination or filtering. This will cause performance issues as data grows. Implement cursor- or offset-based pagination.Tasks:
PaginationDtowithpage,limit, andsortByfieldsUsersService.findAll()using TypeORMtake/skip{ data, total, page, limit }Acceptance Criteria:
pageandlimitquery paramsETA: 1 day