Skip to content

Feed Post Retrieval with Pagination #14

@Cybermaxi7

Description

@Cybermaxi7

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

  1. Update src/feed/feed.controller.ts to accept pagination query parameters.
  2. Implement pagination logic in src/feed/feed.service.ts.
  3. 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! 🚀

Metadata

Metadata

Assignees

Labels

NESTJSgood first issueGood for newcomersonlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions