Skip to content

Create API endpoints for news collection #32

@himanshusanecha

Description

@himanshusanecha

There will be certain endpoints for CRUD operations on news as mentioned below.

  1. /post - so that news can be posted, only accessible to publisher of the news.
  2. /getAll - to get latest news in a sorted order of published parameter (latest first) - also limit the number of news as whenever the app will grow we only need to fetch some of the latest news and not all. (Only title and abstract are to be fetched from the database. refer Creating a news schema in mongoose #27)
  3. /get/:id - to get all content of a specific news.
  4. /update - so that news can be updated. Only available to publisher of the news.
  5. /publish/:id - so that a particular news can be published

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions