You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every list endpoint currently returns a raw array. There is no consistent pagination contract (page, limit, total) across endpoints, making frontend integration inconsistent.
Proposed Solution
Create backend/src/opsce/common/dto/pagination.dto.ts and a PaginatedResponseDto<T> generic wrapper. Use these across all list endpoints.
Acceptance Criteria
PaginationDto has: page (default 1, min 1), limit (default 20, min 1, max 100) with @IsInt, @Min, @Max validators
Problem
Every list endpoint currently returns a raw array. There is no consistent pagination contract (page, limit, total) across endpoints, making frontend integration inconsistent.
Proposed Solution
Create
backend/src/opsce/common/dto/pagination.dto.tsand aPaginatedResponseDto<T>generic wrapper. Use these across all list endpoints.Acceptance Criteria
PaginationDtohas:page(default 1, min 1),limit(default 20, min 1, max 100) with@IsInt,@Min,@MaxvalidatorsPaginatedResponseDto<T>has:data: T[],total: number,page: number,limit: number,totalPages: numberpaginate(query, paginationDto)helper function created to reduce boilerplate