remotes/1693045480750635534/spooky-22
Aevann1 2021-09-17 14:40:24 +02:00
parent 4c448ac6fa
commit fe7e5c98c4
1 changed files with 15 additions and 0 deletions

View File

@ -83,6 +83,21 @@ def shop(v):
return render_template("settings_shop.html", owned=owned, awards=list(AWARDS.values()), v=v)
@app.get("/awards")
@auth_required
def get_awards(v):
return_value = list(AWARDS.values())
user_awards = v.awards
for val in return_value:
val['owned'] = user_awards.filter_by(kind=val['kind'], submission_id=None, comment_id=None).count()
return jsonify(return_value)
@app.post("/buy/<award>")
@auth_required
def buy(v, award):