Skip to content

API Routes

Jaden Lambino edited this page May 9, 2022 · 2 revisions

User Routes

/users/

  • Route used to check if a user is authenticated or not

/users/login/

  • Route used to check if a certain user is in the database

/users/signup/

  • Route used to add a new instance of a user into the database

/users/logout/

  • Allows the user to be logged out of the website, therefore being unauthenticated

Listing Routes

/listings/

  • Route used to get all of the listings in the database

/listings/int:id/

  • Route used to get a listing by its id, to edit a listing by its specific id, and to delete an instance of a listing from the database

/listings/int:tag/

  • Route used to get all listings with a specific tag

/listings/new/

  • Route used to add a new instance of a listing to the database

Review Routes

/reviews/

  • Route used to get all of the listings in the database

/reviews/int:id/

  • Route used to edit a listing by its specific id, and to delete an instance of a listing form the database

/reviews/new/

  • Route used to add a new instance of a review to the database

/reviews/int:user_id/

  • Route used to get all the listings in the database per specific user