Understanding Post Request Logic: Checking Availability and Waitlist for Bookings

In this meeting, James raised a question about how to check data before making a POST request. He wanted to know how to verify if a booking is already made before proceeding with the POST request. The State Changers suggested a couple of solutions. One option is to add a precondition at the top of the booking endpoint, which would check availability and return an error if it is already booked. Another option is to create a separate endpoint for adding to a waitlist if the booking is already taken. The waitlist would be tied to the availability ID and would allow the next person in line to take the booking if the first person cancels. Additionally, they discussed the need to create a table for the waitlist. The State Changers emphasized the flexibility of customizing the logic before and after the automated steps provided by Zeno, enabling James to fully utilize his capabilities. The meeting concluded with the transition to discuss another topic with Amir.

(Source: Office Hours 10/31 )

State Change Members Can View The Video Here

View This Video Now

Join State Change Risk-Free