Skip to content

Add endpoints to manage Dailies

What does this MR do?

Adds all the necessary endpoints for the Feed Service inline to the API Contract.

  • Create a Daily (/daily/create).
  • Get a user's Dailies (/user/dailies).
  • Get a user's Feed (/feed)
  • Like a daily (/daily/like)
  • Unlike a daily (/daily/unlike)

Testing

Initial Setup

  • Ensure Docker is installed and running.
  • Run the following command in the root directory: docker-compose up --build
  • Create a database called feed-service.
  • Create a collection called dailies.
  • Download Daily.postman_collection.json.
  • Open Postman and click Import.
  • Select the downloaded file.

JWT/CSRF Setup

  • Look at an endpoint's Authorisation, and copy the Secret Key value into the jwt.privateKey field in the /conf/application.conf file.
  • Run a GET endpoint, and once returned access the returned Csrf-Token from the result's header.
  • Edit the collection and access the variables tab.
  • Paste the Csrf-Token value into the Current Value field.

Main

  • Create a Daily using endpoint.
  • Get a User's Dailies using endpoint.
  • Get a User's feed using endpoint.
  • Like a Daily using endpoint.
  • Unlike a Daily using endpoint.

Relevant issues

Closes #19 (closed).

Merge request reports