Update project 6 FRONT SVG SEAT LOCK

This commit is contained in:
2026-03-06 12:39:26 +00:00
parent 02b70f4369
commit a418c53664
4 changed files with 158 additions and 35 deletions

View File

@@ -48,7 +48,7 @@ async def lock_seat(seat_id: int, user_id: int, db: AsyncSession = Depends(get_d
ticket.user_id = user_id
await db.commit()
return {"message": "Seat locked successfully", "seat_id": seat_id, "status": "LOCKED"}
return {"message": "Seat locked successfully", "seat_id": seat_id, "ticket_id": ticket.id, "status": "LOCKED"}
except Exception as e:
# Критически важно: если БД отвалилась, снимаем лок в Redis, иначе место зависнет на 15 минут