Skip to content
Valery Nguyen edited this page May 13, 2019 · 2 revisions

Backend Routes

HTML

  • GET / - index.html

API Endpoints

users

  • GET /api/users/current - returns the current user
  • POST /api/users/register - registers a new user
  • POST /api/users/login - logs in the user

spots

  • POST /api/spots - returns all spots
  • GET /api/spots/:spot_id - returns an individual spot

bookings

  • POST /api/bookings - gets all bookings for the current user
  • GET /api/bookings/:spot_id - gets all bookings for a spot
  • POST /api/bookings - creates a new booking
  • DELETE /api/bookings/:booking_id - deletes a booking