justinmauldin7 / Play_BE

0 stars 1 forks source link

Post a favorite to playlist endpoint #20

Closed danbriechle closed 5 years ago

danbriechle commented 5 years ago

As a user when I send a post request to /api/v1/playlists/:playlist_id/favorites/:id

the favorite with :id is added to the playlist with :playlist_id

This creates a new record in the Playlist Favorites table to establish the relationship between this song favorite and playlist. If the playlist/favorite cannot be found, a 404 will be returned.

If successful, this request will return a status code of 201 with the following body:

{ "message": "Successfully added SONG_NAME to PLAYLIST_NAME" }