justinmauldin7 / Play_BE

0 stars 1 forks source link

Get favorites by playlist id endpoint #19

Closed danbriechle closed 5 years ago

danbriechle commented 5 years ago

A user when I send a get request to /api/v1/playlists/:playlist_id/favorites the response returns all the favorites associated with the playlist with an id specified by :playlist_id or a 404 if the playlist is not found

If successful, this request will return a response in the following format:

{ "id": 1, "playlist_name": "Favorite songs of all time", "favorites": [ { "id": 1, "name": "We Will Rock You", "artist_name": "Queen" "genre": "Rock", "rating": 88 }, { "id": 2, "name": "Careless Whisper", "artist_name": "George Michael" "genre": "Pop", "rating": 93 } ] }