Skip to content

BE: API - Get Public Feed (Read) #13

@TNxRebel

Description

@TNxRebel

Description:
The frontend needs to fetch a list of all issues to display them in the main feed. We need an endpoint that returns every issue stored in the database.

Technical Specs:

  • Route: GET /api/issues

  • Response: Array of Issue objects (JSON)

Subtasks:

  • Create a Controller function (e.g., getAllIssues).

  • Use the Database Model to find() all documents.

  • Sort logic: Ensure the list is sorted by createdAt in descending order (newest first).

  • Connect the function to the route in your router file.

  • Test: Manually add a dummy entry to the DB and verify you can see it using Postman/Browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions