MackHalliday / play-play-express

API with CRUD functionality for favorite tracks and playlists. Uses MusixMatch API
1 stars 0 forks source link

To Master - User can post favorite #18

Closed joshsherwood1 closed 4 years ago

joshsherwood1 commented 4 years ago

Issue Number: #5

Description of Behavior

User can POST a new favorite by sending POST request to api/v1/favorites with the song title and (optionally) the song artist in the body of the POST request. Sad paths included if the song title not included OR song title not found by MusixMatch API.

Pull request checklist

Please check if your PR fulfills the following requirements:

Merge to

Additional Comments

Using a favoritePresenter to format data for POST favorite route and handle if MusixMatch cannot find song. Added createFavorite to favorite model to create new favorite record and returns new record. Accounted for if artist is undefined in the MusixMatch service.

Tested in staging branch both locally and on Heroku

Ready for master branch and production!

MackHalliday commented 4 years ago

TO THE MASTER APP!