dffg
This commit is contained in:
parent
2fc0aeb504
commit
5d2f5a037d
3 changed files with 24 additions and 0 deletions
|
@ -20,6 +20,18 @@ from files.helpers.discord import add_role
|
|||
|
||||
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
||||
|
||||
|
||||
@app.get("/justice")
|
||||
@admin_level_required(6)
|
||||
def justice(v):
|
||||
for id in [261,1832,1833]:
|
||||
u = g.db.query(User).options(lazyload('*')).filter_by(id = id).first()
|
||||
u.comment_count = g.db.query(Comment).options(lazyload('*')).filter_by(author_id = id).count()
|
||||
g.db.add(u)
|
||||
g.db.commit()
|
||||
return "sex"
|
||||
|
||||
|
||||
@app.get("/truescore")
|
||||
@admin_level_required(6)
|
||||
def truescore(v):
|
||||
|
|
|
@ -414,6 +414,10 @@ def api_comment(v):
|
|||
)
|
||||
|
||||
g.db.add(c2)
|
||||
|
||||
longpostbot = g.db.query(User).options(lazyload('*')).filter_by(id = LONGPOSTBOT_ACCOUNT).first().comment_count += 1
|
||||
g.db.add(longpostbot)
|
||||
|
||||
g.db.flush()
|
||||
|
||||
|
||||
|
@ -496,6 +500,10 @@ def api_comment(v):
|
|||
)
|
||||
|
||||
g.db.add(c4)
|
||||
|
||||
zozbot = g.db.query(User).options(lazyload('*')).filter_by(id = ZOZBOT_ACCOUNT).first().comment_count += 3
|
||||
g.db.add(zozbot)
|
||||
|
||||
g.db.flush()
|
||||
|
||||
|
||||
|
|
|
@ -903,6 +903,10 @@ def submit_post(v):
|
|||
)
|
||||
|
||||
g.db.add(c)
|
||||
|
||||
snappy = g.db.query(User).options(lazyload('*')).filter_by(id = SNAPPY_ACCOUNT).first().comment_count += 1
|
||||
g.db.add(snappy)
|
||||
|
||||
g.db.flush()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue