chicken-sloths / bangazon-api-sprint1

API for a mock Amazon + Etsy platform providing developers access to the company's employee & product data
0 stars 0 forks source link

Tiny fix : handles errors with creating new orders #118

Closed jordan-castelloe closed 6 years ago

jordan-castelloe commented 6 years ago

Description

This checks to see if users specify a payment_option_id when they create a new order. If they don't, it creates a payment_option_id with a value of null.

Number of Fixes

Fixes #115

Testing

  1. Start your server.
  2. POST the following JSON to localhost:8080/api/v1/orders: {"customer_id":1}
  3. Check what id that returns and go GET the order with that id (localhost:8080/api/v1/orders/id)
  4. The order should have a payment_option_id and the value should be null.
kenziebottoms commented 6 years ago

testing