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:
[x] Tests are written
[x] Test coverage acceptable
[x] Sad paths accounted for
[x] Tested in browser
Merge to
[ ] Development branch
[ ] Staging branch
[x] Master
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
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!