Backend Routes - nikhilmenon2/aptbnb GitHub Wiki
API Endpoints
Spots
POST /api/spots
- Returns all spots.
GET /api/spots/:spot_id
- Returns the specific route requested.
Bookings
POST /api/bookings
- Returns all bookings made by user.
GET /api/bookings/:spot_id
- Returns all bookings by spot.
POST /api/bookings
- Creates a new booking.
DELETE /api/bookings/:booking_id
- Deletes the specific booking.
Users
GET /api/users/current
- Returns the current users.
POST /api/users/register
- Registers a new user.
POST /api/users/login
- Logs in user that made request.