issues
search
gracecizma
/
HeirBnB
0
stars
0
forks
source link
Create a Booking from a Spot based on the Spot's id
#24
Open
gracecizma
opened
1 year ago
gracecizma
commented
1 year ago
Create and return a new booking from a spot specified by id.
[x] An authenticated user is required for a successful response
[x] A user is only authorized to create a booking if they do NOT own the spot
[x] New booking exists in the database after request
[x] Booking data returned includes the id, userId, spotId, startDate, endDate, createdAt, and updatedAt
[x] Error response with status 404 is given when a spot does not exist with the provided id
[x] Error response with status 403 is given when a booking already exists for the spot on the specified dates
Create and return a new booking from a spot specified by id.