{"success":false}
I'm assuming this was intended to return true, but it returned false because the available time slot for the performer and venue do not match. Guessing the database has been changed since the example workflow was created and tested.
Internal Server Error - I can't create a venue. My guess is you made the user_id have to be unique in supabase, and the duplicate :d parameter binding on line 45 in user.py is trying to create another venue with user_id 10000, which is causing an error. Going to use the existing venue for the rest of this test workflow.
{"success":true} - created booking 5, {"venue_id":1,"performer_id":3,"time_start":"2023-10-28T00:00:00+00:00","time_end":"2023-10-28T03:00:00+00:00"}. Pretty sure this is not good, because performer_id 3's time_available and time_end do not fall within the time_start and time_end given.
{"success":true} - I think this should have failed because performer's time available is not open for the given booking time slot. {
"performer_id": 3,
"name": "taylorswiftismid",
"capacity_preference": 10000,
"price": 10000,
"time_available": "2023-11-13T04:50:08.008782+00:00",
"time_end": "2023-11-13T04:50:08.008782+00:00"
} (also not sure why time_available and time_end are timestamps of when I created the account)
Get booking and delete it. Then try to delete it again
Given Workflows
Example Workflow: Performer Booking a Venue
Signup/Signin
View/Modify Booking
curl -X 'GET' 'https://airstage-api.onrender.com/book/3' -H 'accept: application/json'
{"detail":"Not Found"} Guessing the API has been changed since the example workflows were created. Appears that this is now done with:
curl -X 'GET' 'https://airstage-api.onrender.com/catalog/booking/3' -H 'accept: application/json'
{"venue_id":1,"performer_id":1,"time_start":"2023-11-06T22:00:00+00:00","time_end":"2023-11-07T00:00:00+00:00"}
curl -X 'POST' 'https://airstage-api.onrender.com/book/bookings/edit/3' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"venue_id":1,"performer_id":1,"time_start":"2023-11-04T22:00:00+00:00","time_end":"2023-11-07T00:00:00+00:00"}'
{"success":true}
Other Workflows
Create Venue, book a performer, and try modifying the booking to a time that they are not available
curl -X 'POST' 'https://airstage-api.onrender.com/user/signup/' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"username": "levis_stadium", "password": "test456", "user_type": "venue"}'
Internal Server Error - I can't create a venue. My guess is you made the user_id have to be unique in supabase, and the duplicate :d parameter binding on line 45 in user.py is trying to create another venue with user_id 10000, which is causing an error. Going to use the existing venue for the rest of this test workflow.
curl -X 'POST' 'https://airstage-api.onrender.com/book/create/request_performer/1' -H 'accept: appli cation/json' -H 'Content-Type: application/json' -d '{ "performer_id": 3, "name": "taylorswiftismid", "capacity_preference": 10000, "price": 10000, "time_available": "2023-11-13T04:50:08.008782+00:00", "time_end": "2023-11-13T04:50:08.008782+00:00" }'
{"success":true} - created booking 5, {"venue_id":1,"performer_id":3,"time_start":"2023-10-28T00:00:00+00:00","time_end":"2023-10-28T03:00:00+00:00"}. Pretty sure this is not good, because performer_id 3's time_available and time_end do not fall within the time_start and time_end given.
curl -X 'POST' 'https://airstage-api.onrender.com/book/bookings/edit/5' -H 'accept: application/json ' -H 'Content-Type:application/json' -d '{"venue_id":1,"performer_id":3,"time_start":"2023-11-04T22:00:00+00:00","time_end":"2023-11-07T00:00:00+00:00"}'
{"success":true} - I think this should have failed because performer's time available is not open for the given booking time slot. { "performer_id": 3, "name": "taylorswiftismid", "capacity_preference": 10000, "price": 10000, "time_available": "2023-11-13T04:50:08.008782+00:00", "time_end": "2023-11-13T04:50:08.008782+00:00" } (also not sure why time_available and time_end are timestamps of when I created the account)
Get booking and delete it. Then try to delete it again
Try creating a booking for a performer that does not exist, and for performer with incorrect performer payload.