Backend Routes - acrks/rillow GitHub Wiki

HTML

  • `GET / StaticPages Controller#root

API Endpoints

users

  • GET /api/users/ - Assists the User Search feature
  • GET /api/users/:id - returns user information with created listings
  • POST /api/users - create a user profile

session

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

listings

  • GET /api/listings - return a list of listings based on user-entered params and other data
  • GET /api/listings/:id - get a page dedicated to a specific listing with comprehensive description and specs
  • POST /api/listings - create listing
  • PATCH /api/listings/:id - edit listing
  • DELETE /api/listings/:id - edit a listing

likes

  • POST /api/likes - like a listing
  • DELETE /api/likes/:id - unlike a listings

Note: All listings that a user has liked, will all be rendered out by jbuilder view /api/users/:id/likes. See Sample State for more details

tours

  • POST /api/tours - create a tour
  • DELETE /api/tours - delete a tour
  • PATCH /api/tours/:id - edit a tour time

Note: All tours that a user has scheduled listings for will be rendered out by jbuilder view /api/users/:id/tours. See Sample State for more details