-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
DavidWoolner edited this page Sep 3, 2021
·
8 revisions
-
GET/
StaticPagesController#root
-
GET /api/users/:id
- returns bookings and listings for a single user -
POST /api/users
- signs up a new user, and returns their info -
PATCH /api/users/:id
- updates a user's profile -
DELETE /api/users/:id
- deletes a user's profile
-
POST /api/session
- log in - returns current user info -
DELETE api/session
- log out
-
GET /api/listings/
- index to be filtered by search criteria -
GET /api/listings/:id
- show page -
POST /api/listings/
- create a new listing -
PATCH /api/listings/:id
- update a listing -
DELETE /api/listings/:id
- delete a listing
-
GET /api/users/:id
- get a specific booking by id -
POST /api/bookings
- add a new booking to listings -
PATCH /api/users/:user_id/bookings/:bookings_id
- allows a user to update their booking -
DELETE /api/bookings/:id
- allows a user to cancel a booking
-
GET /api/listings/:listing_id/reviews
- fetches all reviews for a listing -
POST /api/listings/:listing_id/reviews
- creates a new review under a listing