feat: adjustments for Demo Team (team_id = 42)

This commit is contained in:
2025-05-08 07:07:14 +02:00
parent 6378488fd0
commit 1c71df781c
8 changed files with 91 additions and 9 deletions

View File

@@ -76,6 +76,8 @@ def submit_mvps(
mvps: MVPRanking,
user: Annotated[Player, Depends(get_current_active_user)],
):
if mvps.team == 42:
return JSONResponse("DEMO team, nothing happens")
if user.id == mvps.user:
with Session(engine) as session:
statement = select(Team).where(Team.id == mvps.team)
@@ -121,6 +123,8 @@ def get_mvps(
def submit_chemistry(
chemistry: Chemistry, user: Annotated[Player, Depends(get_current_active_user)]
):
if chemistry.team == 42:
return JSONResponse("DEMO team, nothing happens")
if user.id == chemistry.user:
with Session(engine) as session:
statement = select(Team).where(Team.id == chemistry.team)