Skip to content
UjwalBattar edited this page Apr 3, 2018 · 1 revision

Routes

Frontend Routes

  • / - landing page
  • /login
  • /signup
  • /listings - listings index
  • /listings/new - create a listing
  • /listings/:listingId - listing show
  • /listing/:listingId/edit - update a listing

Backend Routes

HTML

  • GET / StaticPagesController#root
  • API Endpoints

users

  • POST /api/users - sign up

session

  • POST /api/session - log in
  • DELETE /api/session - log out

listings

  • GET /api/listings - returns relevant listings (filtered by data/params)
  • GET /api/listings/:id - returns listing
  • POST /api/listings - creates a listing
  • PATCH /api/listings/:id - edit a listing
  • DELETE /api/listings/:id - remove a listing

reviews

  • POST /api/listings/:listing_id/reviews - create a review
  • PATCH /api/listings/:listing_id/reviews/:id - edit a review
  • DELETE /api/listings/:listing_id/reviews/:id - delete a review Note: likes does not include a GET route because we will have these routes render the api/chirps/show.json.jbuilder view. See Sample State.
Clone this wiki locally