forked from MarseyWorld/MarseyWorld
master
parent
74789e99f4
commit
7d7b2c5304
|
@ -27,10 +27,13 @@ SITE_NAME = environ.get("SITE_NAME", "").strip()
|
|||
@app.get("/admin/refund")
|
||||
@admin_level_required(6)
|
||||
def refund(v):
|
||||
#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()
|
||||
print(sex)
|
||||
#g.db.add(u)
|
||||
for u in g.db.query(User).all():
|
||||
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()
|
||||
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()
|
||||
print(posts+comments)
|
||||
break
|
||||
u.truecoins = posts+comments
|
||||
g.db.add(u)
|
||||
return "sex"
|
||||
|
||||
@app.post("/@<username>/revert_actions")
|
||||
|
|
Loading…
Reference in New Issue