justinmauldin7 / Play_BE

0 stars 1 forks source link

Post to favorites index endpoint #15

Closed danbriechle closed 5 years ago

danbriechle commented 5 years ago

As a user when I send a post request to /api/v1/favorites the end point creates a new favorite for the database.

Please note that the rating system should only allow for a number between 1-100.

To create a new favorite, use the following parameters:

{ "favorites": { "id": 1, "name": "We Will Rock You", "artist_name": "Queen" "genre": "Rock", "rating": 88 } }

If the favorite is not successfully created, a 400 status code will be returned. All fields are required.