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

Joe customers mvc post put patch #94

Closed joechesney closed 6 years ago

joechesney commented 6 years ago

Description

This branches off from my GET pull request for the Customers MVC

Number of Fixes

1

Related Ticket(s)

64

Problem to Solve

POST functionality

Expected Behavior

posting a JSON object to the customers route will add that customer to our database

Steps to Test Solution

  1. Open Postman, try to use the POST method to send this JSON object below to the url: http://127.0.0.1:8080/api/v1/customers

{ "first_name": "Joe", "last_name": "Chesney", "account_creation_date": "2001-10-22T15:52:23.254Z", "street_address": "1999 Very Real Road", "city": "Yupsville", "state": "Ca", "postal_code": "83920", "phone_number": "(555) 555-3454" } Then open our database in sql and reload the database and open the customers table and see if the new customer is added to the database.

Testing

[ ] There are new unit tests in this PR, and I verify that there is full coverage of all new code. [ ] I certify that all existing tests pass

Documentation

[x] There is new documentation in this pull request that must be reviewed.. [ ] I added documentation for any new classes/methods

Deploy Notes

Notes regarding deployment the contained body of work. These should note any db migrations, etc.