Skip to content

Commit

Permalink
i'm tired of missing the motherfucking flags on the motherfucking sco…
Browse files Browse the repository at this point in the history
…reboard
  • Loading branch information
zardus committed Jan 13, 2024
1 parent c37872d commit f5b07ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dojo_plugin/api/v1/scoreboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def hook_object_update(mapper, connection, target):
invalidate_scoreboard_cache()

def get_scoreboard_page(model, duration=None, page=1, per_page=20):
belt_data = get_belts()
results = get_scoreboard_for(model, duration)

start_idx = (page - 1) * per_page
Expand All @@ -107,7 +108,7 @@ def standing(item):
result = {key: item[key] for key in item.keys()}
result["url"] = url_for("pwncollege_users.view_other", user_id=result["user_id"])
result["symbol"] = email_symbol_asset(result.pop("email"))
result["belt"] = belt_asset(None) # TODO
result["belt"] = belt_asset(belt_data["users"].get(result["user_id"], {"color":None})["color"])
result["badges"] = [] # TODO
return result

Expand Down

0 comments on commit f5b07ad

Please sign in to comment.