This commit is contained in:
Aevann1 2021-10-21 15:30:05 +02:00
parent 0146ffde48
commit bcf7d8c456
7 changed files with 115 additions and 11 deletions

View file

@ -146,7 +146,8 @@ def shop(v):
elif v.patron == 4: val["price"] = int(val["price"]*0.75)
else: val["price"] = int(val["price"]*0.70)
return render_template("settings_shop.html", owned=owned, awards=list(AWARDS.values()), v=v)
sales = g.db.query(Vote.id).count() + g.db.query(CommentVote.id).count() - g.db.query(func.sum(User.coins)).scalar()
return render_template("shop.html", owned=owned, awards=list(AWARDS.values()), v=v, sales=sales)
@app.post("/buy/<award>")