forked from rDrama/rDrama
fdfd
parent
4c448ac6fa
commit
fe7e5c98c4
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue