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

### Edit a Booking #5

Open
7 tasks done
jacoblauxman opened this issue Oct 21, 2022 · 0 comments
Open
7 tasks done

### Edit a Booking #5

jacoblauxman opened this issue Oct 21, 2022 · 0 comments

Comments

@jacoblauxman
Copy link
Owner

jacoblauxman commented Oct 21, 2022

Update and return an existing booking.

  • An authenticated user is required for a successful response
  • Only the owner of the booking is authorized to edit
  • Booking record is updated 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 booking does not exist with
    the provided id
  • Error response with status 400 is given when it is past the booking's
    endDate (no editing of past bookings)
  • Error response with status 403 is given when a booking already exists for
    the spot on the specified dates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant