Complete main functionallity of backend and frontend.

This commit is contained in:
2026-02-21 18:29:22 +01:00 Verified
parent 3a795418d3
commit 7ce44979b9
16 changed files with 383 additions and 168 deletions
@@ -0,0 +1,20 @@
# backend/app/routes/tournaments/settings.py
from fastapi import Depends, HTTPException
from sqlalchemy.orm import Session
from ... import crud, schemas
from ...database import get_db
from ...core.auth import get_current_user
from . import router
@router.get("/{id}/settings", response_model=schemas.TournamentSettingsResponse)
def get_tournament(
id: str, db: Session = Depends(get_db), user: str = Depends(get_current_user)
):
t = crud.get_tournament(db, id)
if not t:
raise HTTPException(404, "Tournament not found")
return t