Skip to content

Commit

Permalink
Update match result calculations to compare with player team
Browse files Browse the repository at this point in the history
  • Loading branch information
raimannma committed Jan 17, 2025
1 parent 68ef217 commit ad8c8df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deadlock_data_api/routers/v1_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def wins_today(
"""Get the number of wins today"""
account_id = utils.validate_steam_id(account_id)
matches = get_daily_matches(account_id)
wins = sum(m.match_result for m in matches)
wins = sum(m.match_result == m.player_team for m in matches)
return str(wins)

def losses_today(
Expand All @@ -258,7 +258,7 @@ def losses_today(
"""Get the number of losses today"""
account_id = utils.validate_steam_id(account_id)
matches = get_daily_matches(account_id)
losses = len(matches) - sum(m.match_result for m in matches)
losses = sum(m.match_result != m.player_team for m in matches)
return str(losses)

def latest_patchnotes_title(
Expand Down

0 comments on commit ad8c8df

Please sign in to comment.