Create endpoint for adding album reviews
Closed this issue · 0 comments
JoseRenan commented
Create endpoint on backend to add reviews to track.
endpoint:
/albums/{album id on spotify}/reviews
- POST
- It will receive a JSON with the format:
{ "user": "userId", "album": "id of the album on spotify", "rating": 4.5, "review": "[OPTIONAL OBJECT TO BE DEFINED]" }
- Store it in a collection "reviews/albums" (there is a concept of subcollection on firestore) using the firebase cloud firestore, we already have an example using the cloud firestore here
- Return the review JSON with its id
if the #69 is already done, this endpoint must be protected to be called only by logged users