gf
This commit is contained in:
parent
19001a8330
commit
ad6148d16b
1 changed files with 7 additions and 4 deletions
|
@ -27,10 +27,13 @@ SITE_NAME = environ.get("SITE_NAME", "").strip()
|
||||||
@app.get("/admin/refund")
|
@app.get("/admin/refund")
|
||||||
@admin_level_required(6)
|
@admin_level_required(6)
|
||||||
def refund(v):
|
def refund(v):
|
||||||
#for u in g.db.query(User).all():
|
for u in g.db.query(User).all():
|
||||||
sex = g.db.query(func.sum(Submission.upvotes + Submission.downvotes - 2)).options(lazyload('*')).filter_by(author_id = 1, is_banned = False, deleted_utc = 0).scalar()
|
posts = g.db.query(func.sum(Submission.upvotes + Submission.downvotes - 1)).options(lazyload('*')).filter_by(author_id = 1, is_banned = False, deleted_utc = 0).scalar()
|
||||||
print(sex)
|
comments = g.db.query(func.sum(Comment.upvotes + Comment.downvotes - 1)).options(lazyload('*')).filter_by(author_id = 1, is_banned = False, deleted_utc = 0).scalar()
|
||||||
#g.db.add(u)
|
print(posts+comments)
|
||||||
|
break
|
||||||
|
u.truecoins = posts+comments
|
||||||
|
g.db.add(u)
|
||||||
return "sex"
|
return "sex"
|
||||||
|
|
||||||
@app.post("/@<username>/revert_actions")
|
@app.post("/@<username>/revert_actions")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue