SDN302_-_PE_-_SU_2025_-_Block_1_3971.webp
lanhong87

SDN302_-_PE_-_SU_2025_-_Block_1_3971.webp

Kizspy.me
。 Validate if bookingld does not exist, then return message: "Booking not found"
Question 4 (2.5 points) - Create a New Booking
Task: Develop an API that allows a user to book tickets for an event.
API Details:
• Method: POST
• URI: http://localhost:9999/api/bookings
• Input:
}
}
"userid": "..."
"eventId": "..."
"quantity":...
802 Summer 2025
Zoom
Output: The newly created booki document.
о
Validate:
■ If eventid does not exist, return message: "Event not found"
■ If the number of tickets to book (quantity) is greater than available Tickets
returns the message: "Not enough tickets available"
Additional Requirement: Automatically update the availableTickets field of the
event (decrease based on quantity booked).
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
SDN302
Thêm bởi
lanhong87
Ngày thêm
Lượt xem
1,853
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom