Skip to content
rkoron007 edited this page Apr 10, 2018 · 17 revisions

Routes:

FrontEnd:

  • / - main splash page
  • /login
  • /signup
  • /cart - view shopping cart
  • /search - search items
  • /users/:userId - user profile with their listed items
  • /items - view all items
  • /items/new - create a item
  • /items/:itemId - show an item- can comment on item here as well
  • /items/:itemId/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

Session:

  • POST /api/session -logs in the user
  • DELETE /api/session -logs the user out

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

Reviews:

  • POST /api/items/:item_id/reviews - create a review on an item
  • DELETE /api/reviews/:id - delete a review on an item

Cart:

  • GET api/carts/ - returns user's shopping cart
  • POST api/cart_items/:item_id - adds an item to a user's shopping cart
  • DELETE api/cart_items/:item_id - remove an item from shopping cart
Clone this wiki locally