BACKEND ROUTES - TheBabblingBrin/capstone-bnb GitHub Wiki
API routes
/session
- A registered user may log in with valid credentials or logout
GET /session
POST /session
DELETE /session
/users
- A user can create an account.
POST /users
- A logged in user can view a user profile
GET /users/:userId
- A logged in user can delete their account
DELETE /users/:userId
- A logged in user can update their account
UPDATE /users/:userID
/spots/
-
Allows a user to view all spots or a specific spot
GET /spots
GET /spotss/:spoId
-
Allows a user to create a spot
POST /spots
-
Allow a user to delete a spot they own
DELETE /spots/:spotId
-
Allow a user to update information about a spot they own
UPDATE /spots/:spotId
/bookings
-
Allow a user to view all their bookings
GET /bookings
-
Allow a user to update details of a specific booking they created
UPDATE /bookings/:bookingId
-
Allow a user to delete a specific booking they created
DELETE /bookings/:bookingId
-
Allow a user to create a booking
POST /bookings
/reviews
-
Allow a user to view a list of all reviews they left
- `GET /reviews
-
Allow a user to view the details of a review
GET /reviews/:reviewId
-
Allow a user to update details of a specific review they created
UPDATE /reviews/:reviewId
-
Allow a user to delete a specific review they created
DELETE /reviews/:reviewId
-
Allow a user to view all reviews of a spot
GET /reviews/spot/:spotId
-
Allow a user to post a review to a spot
POST /reviews/spot/:spotId