remotes/1693045480750635534/spooky-22
Aevann1 2021-07-26 02:03:44 +02:00
parent c74a108db7
commit bcb0e2e5a2
2 changed files with 1 additions and 23 deletions

View File

@ -24,28 +24,6 @@ import matplotlib.pyplot as plt
from .front import frontlist
from drama.__main__ import app, cache
@app.route("/dramacoins/posts", methods=["GET"])
@admin_level_required(6)
def dp(v):
for p in g.db.query(Submission).options(lazyload('*')).all():
print(p.id)
if p.author:
print(p.author.username)
p.author.dramacoins += p.upvotes + p.downvotes - 1
g.db.add(p.author)
return "sex"
@app.route("/dramacoins/comments", methods=["GET"])
@admin_level_required(6)
def dc(v):
for p in g.db.query(Comment).options(lazyload('*')).filter(Comment.parent_submission != None).all():
print(p.id)
if p.author:
print(p.author.username)
p.author.dramacoins += p.upvotes + p.downvotes - 1
g.db.add(p.author)
return "sex"
@app.route("/admin/shadowbanned", methods=["GET"])
@auth_required
def shadowbanned(v):

View File

@ -11,7 +11,7 @@ from drama.helpers.alerts import *
def badmins(v):
badmins = g.db.query(User).filter_by(admin_level=6).all()
return {
"html":lambda:render_template("mods.html", v=v, badmins=badmins),
"html":lambda:render_template("badmins.html", v=v, badmins=badmins),
"api":lambda:jsonify({"data":[x.json for x in badmins]})
}