cvxcvx
This commit is contained in:
parent
32e3f5018f
commit
f59d4e6f11
7 changed files with 23 additions and 14 deletions
|
@ -17,7 +17,7 @@ def privacy(v):
|
|||
@app.get("/marseys")
|
||||
@auth_required
|
||||
def marseys(v):
|
||||
with open("marseys.json", 'r') as f: marsey_count = list(loads(f.read().replace("'",'"')).items())
|
||||
marsey_count = cache.get("marseys").items()
|
||||
marsey_count = sorted(marsey_count, key=lambda x: list(x[1].values())[2], reverse=True)
|
||||
return render_template("marseys.html", v=v, marseys=marsey_count)
|
||||
|
||||
|
@ -48,7 +48,7 @@ def participation_stats(v):
|
|||
|
||||
day = now - 86400
|
||||
|
||||
with open("marseys.json", 'r') as f: marseys = loads(f.read().replace("'",'"'))
|
||||
marseys = cache.get("marseys")
|
||||
|
||||
data = {"marseys": len(marseys),
|
||||
"users": g.db.query(User.id).count(),
|
||||
|
@ -373,7 +373,7 @@ def badges(v):
|
|||
@app.get("/marsey_list")
|
||||
@auth_required
|
||||
def marsey_list(v):
|
||||
with open("marseys.json", 'r') as f: return loads(f.read().replace("'",'"'))
|
||||
return cache.get("marseys")
|
||||
|
||||
@app.get("/blocks")
|
||||
@auth_required
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue