Skip to content

Backend Routes

Nikhil Kumar edited this page Jun 17, 2022 · 6 revisions

HTML

  • GET / - StaticPagesController#root

API Endpoints

users

  • GET /api/users/:id -returns basic user information
  • PATCH /api/users/:id - edit form for user information
  • POST /api/users - create user

session

  • POST /api/session - login user
  • DELETE /api/session - logout user

properties

  • GET /api/properties/:id - returns all properties filtered for specific elements
  • GET /api/property/:id - returns the show page for a property
  • POST /api/posts - create a property
  • PATCH /api/posts/:id - edit a property
  • DELETE /api/posts/:id - remove a post

saves

  • GET /api/users/:id/saves - return all saved properties of a user.
  • POST /api/users/:id/save - save a property.
  • DELETE /api/follows/:id - delete a saved property of a user.

Clone this wiki locally