Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Booking from a Spot based on the Spot's id #20

Open
6 tasks done
ChristoGrab opened this issue Sep 23, 2022 · 1 comment
Open
6 tasks done

Create a Booking from a Spot based on the Spot's id #20

ChristoGrab opened this issue Sep 23, 2022 · 1 comment

Comments

@ChristoGrab
Copy link
Owner

ChristoGrab commented Sep 23, 2022

Create and return a new booking from a spot specified by id.

  • An authenticated user is required for a successful response
  • A user is only authorized to create a booking if they do NOT own the spot
  • New booking exists in the database after request
  • Booking data returned includes the id, userId, spotId, startDate,
    endDate, createdAt, and updatedAt
  • Error response with status 404 is given when a spot does not exist with
    the provided id
  • Error response with status 403 is given when a booking already exists for
    the spot on the specified dates
@ChristoGrab ChristoGrab moved this from Backlog to Next Tasks in AirBnB API Sep 28, 2022
@ChristoGrab ChristoGrab moved this from Next Tasks to Backlog in AirBnB API Sep 28, 2022
@ChristoGrab ChristoGrab moved this from Backlog to Next Tasks in AirBnB API Sep 28, 2022
@ChristoGrab ChristoGrab moved this from Next Tasks to In Progress in AirBnB API Sep 29, 2022
@ChristoGrab ChristoGrab moved this from In Progress to Next Tasks in AirBnB API Sep 29, 2022
@ChristoGrab ChristoGrab moved this from Next Tasks to In Progress in AirBnB API Sep 29, 2022
@ChristoGrab
Copy link
Owner Author

403 Error response works for dates within a booking but not without

@ChristoGrab ChristoGrab moved this from In Progress to Working Locally in AirBnB API Sep 30, 2022
@ChristoGrab ChristoGrab moved this from Working Locally to Deployed in AirBnB API Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Deployed
Development

No branches or pull requests

1 participant