File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
src/Evently.Server/Features/Bookings/Services Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,7 @@ public async Task<Booking> CreateBooking(BookingReqDto bookingReqDto) {
7171 throw new ArgumentException ( string . Join ( "\n " , values : validationResult . Errors . Select ( e => e . ErrorMessage ) ) ) ;
7272 }
7373
74- bool hasPrevBooking =
75- await db . Bookings . AnyAsync ( b => b . AccountId == booking . AccountId && b . GatheringId == booking . GatheringId && b . CancellationDateTime == null ) ;
76- if ( hasPrevBooking ) {
77- throw new ArgumentException ( "Account has already booked" ) ;
74+ throw new ArgumentException ( $ "Account has already booked this gathering (GatheringId: { booking . GatheringId } )") ;
7875 }
7976
8077 booking . BookingId = $ "book_{ await Nanoid . GenerateAsync ( size : 10 ) } ";
You can’t perform that action at this time.
0 commit comments