feat: adjustments for Demo Team (team_id = 42)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user