Skip to content
rkoron007 edited this page Mar 30, 2018 · 17 revisions

Routes:

FrontEnd:

  • / - main splash page
  • /login
  • /signup
  • /cart - view shopping cart
  • /search - search items
  • /users/:userId - user profile
  • /items/ - view all items
  • /items/new - create a item
  • /items/:item_id - show an item (can comment on item here as well)
  • /items/:item_id/edit - edit a item

HTML Routes:

GET / StaticPagesController#root

API Endpoints:

Users:

  • GET /api/users returns user information of displayed items
  • POST /api/users -sign up

Items:

  • GET /api/items - returns relevant items
  • GET /api/items/:id - returns an item
  • POST /api/items - creates an item
  • DELETE /api/items/:id - remove an item
  • PATCH /api/items/:id - update an item

Comments/Reviews:

POST /api/items/:item_id/comments - create a comment on an item DELETE /api/items/:item_id/comments/:id - delete a comment on an item

Cart:

GET /api/users/user_id/cart - returns /api/items/:item_id/comments shopping cart DELETE /api/users/user_id/cart/:item_id - remove an item from shopping cart

Clone this wiki locally