sayed22 commited on
Commit
7ea95ea
·
verified ·
1 Parent(s): 75880fd

Update README.md

Browse files

[HttpPost("{tripId}/book")]
public async Task<IActionResult> Book(Guid tripId, CancellationToken ct)
{
var trip = await db.Trips
.FirstOrDefaultAsync(x => x.Id == tripId, ct);

if (trip == null)
return NotFound();

if (trip.AvailableSeats <= 0)
return BadRequest("No seats available");

trip.AvailableSeats--;

var booking = new Booking
{
TripId = tripId,
UserId = CurrentUser.Id
};

db.Bookings.Add(booking);

await db.SaveChangesAsync(ct);

return Ok(booking.Id);
}

Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: ⚡
4
  colorFrom: yellow
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 6.12.0
8
  app_file: app.py
9
  pinned: false
10
  short_description: Hy3 multi-turn streaming chat with function calling
@@ -20,4 +20,4 @@ short_description: Hy3 multi-turn streaming chat with function calling
20
  - Sidebar controls: think level, system prompt, temperature, max tokens, top-p
21
  - Function calling: paste JSON definitions, see structured tool calls, submit results back
22
  - HTML code-block preview rendered in a sandboxed iframe
23
- - Light & dark themes
 
4
  colorFrom: yellow
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 6.26.0
8
  app_file: app.py
9
  pinned: false
10
  short_description: Hy3 multi-turn streaming chat with function calling
 
20
  - Sidebar controls: think level, system prompt, temperature, max tokens, top-p
21
  - Function calling: paste JSON definitions, see structured tool calls, submit results back
22
  - HTML code-block preview rendered in a sandboxed iframe
23
+ - Light & dark themes