remotes/1693045480750635534/spooky-22
Aevann1 2021-07-28 06:00:26 +02:00
parent 06bc282d0b
commit 6ad630d80e
1 changed files with 19 additions and 0 deletions

View File

@ -20,6 +20,25 @@ import matplotlib.pyplot as plt
from .front import frontlist
from drama.__main__ import app, cache
@app.get("/counts/posts")
@admin_level_required(6)
def counts_posts(v):
for u in g.db.query(User).all():
u.post_count = u.submissions.filter_by(is_banned=False, deleted_utc=0).count()
g.db.add(u)
return "sex"
@app.get("/counts/comments")
@admin_level_required(6)
def counts_comments(v):
for u in g.db.query(User).all():
u.comment_count = u.comments.filter_by(is_banned=False, deleted_utc=0).count()
g.db.add(u)
return "sex"
@app.get("/admin/shadowbanned")
@auth_required
def shadowbanned(v):