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

Follow Kenzie's dope approach to routes #109

Closed DavidLarsKetch closed 6 years ago

DavidLarsKetch commented 6 years ago

Context

  1. @kenziebottoms came up with a way of writing routes that we should follow because it looks clean & clear.
  2. This should be applied routes/products/index & routes/employees/index and each route in routes/products/ & routes/employees/

Process

  1. The indexRouter.use(...) statements in employees/index & products/index should include the table name.
  2. The URL path routes.[VERB] in each individual route should only be ('/', [function]) or ('/:id', [function])

Expected Result

Each route.use should look like route.use('/[table-name]', require('/[table-name]'));