Skip to content
Kevin Choy edited this page Aug 7, 2018 · 6 revisions

Frontend Routes

Our components are organized as follows:

  • Root
    • App
      • NavBar
      • Homepage
      • SignUp
      • Login
      • CampsiteSearch
      • CampsiteShow
      • CampsiteForm
      • Footer

The following routes, defined in App, will render components between NavBar and Footer.

  • /
    • Splash
  • /signup
    • SessionForm
  • /login
    • SessionForm
  • /campsiteSearch
    • CampsiteSearch
  • /users/:userId
    • ProfileComponent
    • CampsiteIndex
      • CampsiteIndexItem
  • /campsite/new
    • CampsiteForm
  • /campsite/:campsiteId
    • CampsiteShow
  • /campsite/:campsiteId/edit
    • CampsiteForm

Backend Routes

HTML

  • GET / StaticPagesController#Root

API Endpoints

users
  • GET /api/users - previous camping history of user
  • POST /api/users - sign up

session

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

campsite

  • GET /api/campsites - return all campsite
  • GET /api/campsites/:campsiteId - return campsite
  • POST /api/campsites - create campsite
  • POST /api/campsites/:campsiteId - edit campsite
  • DELETE /api/campsites/:campsiteId - remove campsite

reviews

  • GET /api/campsites/:campsiteId/reviews - return all review for campsite
  • GET /api/campsites/:campsiteId/reviews/:reviewId - return review for campsite
  • POST /api/campsites/:campsiteId/reviews - create review for campsite
  • POST /api/campsites/:campsiteId/reviews/:reviewId - edit review for campsite
  • DELETE /api/campsites/:campsiteId/reviews/:reviewId - remove review for campsite
Clone this wiki locally