Label fixes, Websocket reconnects and more detailed court view cards.
This commit is contained in:
@@ -19,8 +19,6 @@ def _check_auth(t: models.Tournament, user: Optional[str], code: Optional[str]):
|
||||
|
||||
if not is_admin and not code_matches:
|
||||
raise HTTPException(403, "Invalid tournament code or admin privileges required")
|
||||
|
||||
|
||||
@router.post("/{id}/matches/{match_id}/score")
|
||||
async def report_score(
|
||||
id: str,
|
||||
@@ -29,7 +27,7 @@ async def report_score(
|
||||
db: Session = Depends(get_db),
|
||||
user: Optional[str] = Depends(get_optional_user),
|
||||
):
|
||||
t = crud.get_tournament(db, id)
|
||||
t = crud.get_tournament(db, id, lock=True)
|
||||
if not t:
|
||||
raise HTTPException(404, "Tournament not found")
|
||||
|
||||
@@ -65,7 +63,7 @@ async def edit_score(
|
||||
db: Session = Depends(get_db),
|
||||
user: Optional[str] = Depends(get_optional_user),
|
||||
):
|
||||
t = crud.get_tournament(db, id)
|
||||
t = crud.get_tournament(db, id, lock=True)
|
||||
if not t:
|
||||
raise HTTPException(404, "Tournament not found")
|
||||
|
||||
@@ -99,7 +97,7 @@ async def clear_score(
|
||||
db: Session = Depends(get_db),
|
||||
user: Optional[str] = Depends(get_optional_user),
|
||||
):
|
||||
t = crud.get_tournament(db, id)
|
||||
t = crud.get_tournament(db, id, lock=True)
|
||||
if not t:
|
||||
raise HTTPException(404, "Tournament not found")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user