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

Fixes #64 Sets up routes and end points for the Customers #92

Closed joechesney closed 6 years ago

joechesney commented 6 years ago

Description

This sets up the routes and endpoints for the GET requests for Customers

Related Ticket(s)

64

Fixes #11

Expected Behavior

go to http://127.0.0.1:8080/api/v1/customers and it should list all customers go to http://127.0.0.1:8080/api/v1/customers/0 to see the first customer -- test other id numbers to see singular customers go to http://127.0.0.1:8080/api/v1/customers?active=false to see just the customers that dont have any past orders

Steps to Test Solution

  1. run npm start if you've already got the full database generated
  2. comment out routes other than /customers
  3. add app.use('/api/v1/', routes); after routes declaration in app.js
  4. Go to the 3 urls listed above and see if they give the results

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 // productsIndexRouter.use(require('./productOrders')); // productsIndexRouter.use(require('./orders'));

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.

kenziebottoms commented 6 years ago

testing