forked from rDrama/rDrama
fdfd
parent
06bc282d0b
commit
6ad630d80e
|
@ -20,6 +20,25 @@ import matplotlib.pyplot as plt
|
||||||
from .front import frontlist
|
from .front import frontlist
|
||||||
from drama.__main__ import app, cache
|
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")
|
@app.get("/admin/shadowbanned")
|
||||||
@auth_required
|
@auth_required
|
||||||
def shadowbanned(v):
|
def shadowbanned(v):
|
||||||
|
|
Loading…
Reference in New Issue