fdfd
This commit is contained in:
parent
c4be6a627a
commit
c0a7357ee9
1 changed files with 15 additions and 0 deletions
|
@ -83,6 +83,21 @@ def shop(v):
|
||||||
|
|
||||||
return render_template("settings_shop.html", owned=owned, awards=list(AWARDS.values()), v=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>")
|
@app.post("/buy/<award>")
|
||||||
@auth_required
|
@auth_required
|
||||||
def buy(v, award):
|
def buy(v, award):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue