Skip to content

Add pagination support to tips API#10

Open
MechanikGamer wants to merge 1 commit intotimothywarner-org:mainfrom
MechanikGamer:add-backend-pagination
Open

Add pagination support to tips API#10
MechanikGamer wants to merge 1 commit intotimothywarner-org:mainfrom
MechanikGamer:add-backend-pagination

Conversation

@MechanikGamer
Copy link
Copy Markdown

@MechanikGamer MechanikGamer commented Mar 1, 2026

fixes #1
Add reusable pagination helpers and wire paginated responses into the tips service and controller. Created src/utils/pagination.js (parsePagination, paginateArray), updated src/services/tipService.js to optionally return {data, pagination} for getAll and getByTopic while preserving backward-compatible behavior, and updated src/controllers/tipController.js to parse query params and return paginated results. Also added a .prettierrc file and made minor code/style tweaks and logging improvements.

Add reusable pagination helpers and wire paginated responses into the tips service and controller. Created src/utils/pagination.js (parsePagination, paginateArray), updated src/services/tipService.js to optionally return {data, pagination} for getAll and getByTopic while preserving backward-compatible behavior, and updated src/controllers/tipController.js to parse query params and return paginated results. Also added a .prettierrc file and made minor code/style tweaks and logging improvements.
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.

Add pagination support for GET /api/tips endpoint

1 participant