Overview
Implement pagination for retrieving posts on the feed to support both public and authenticated user access. Posts should be sorted from newest to oldest to enable an efficient frontend feed display. 📈
Background
This feature is essential for the frontend feed display on StarkHive. It allows users and the public to efficiently browse through the feed as content grows. For more context, check the README.
Specifications
- Pagination: Support query parameters for
page and limit.
- Sorting: Posts must be sorted by newest first.
Tasks
- Update
src/feed/feed.controller.ts to accept pagination query parameters.
- Implement pagination logic in
src/feed/feed.service.ts.
- Ensure posts are returned sorted by newest to oldest.
Technical Considerations
- Validate and handle edge cases for page and limit parameters.
- Use efficient sorting and pagination logic to handle large datasets.
Acceptance Criteria
- The feed is retrieved with pagination support using
page and limit parameters.
- Posts are sorted with the newest posts first.
- Code changes are aligned with the project's backend guidelines.
Contribution Guidelines
- Assignment required before PR submission.
- Timeframe: 2–3 days.
- PR description must include:
Close #14.
Follow the contribution guide for detailed instructions.
Let's ensure we deliver a smooth and efficient pagination experience for all users! 🚀
Overview
Implement pagination for retrieving posts on the feed to support both public and authenticated user access. Posts should be sorted from newest to oldest to enable an efficient frontend feed display. 📈
Background
This feature is essential for the frontend feed display on StarkHive. It allows users and the public to efficiently browse through the feed as content grows. For more context, check the README.
Specifications
pageandlimit.Tasks
src/feed/feed.controller.tsto accept pagination query parameters.src/feed/feed.service.ts.Technical Considerations
Acceptance Criteria
pageandlimitparameters.Contribution Guidelines
Close #14.Follow the contribution guide for detailed instructions.
Let's ensure we deliver a smooth and efficient pagination experience for all users! 🚀