df
This commit is contained in:
parent
673586d0bd
commit
a304261ebe
2 changed files with 1 additions and 23 deletions
|
@ -24,28 +24,6 @@ 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.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"])
|
@app.route("/admin/shadowbanned", methods=["GET"])
|
||||||
@auth_required
|
@auth_required
|
||||||
def shadowbanned(v):
|
def shadowbanned(v):
|
||||||
|
|
|
@ -11,7 +11,7 @@ from drama.helpers.alerts import *
|
||||||
def badmins(v):
|
def badmins(v):
|
||||||
badmins = g.db.query(User).filter_by(admin_level=6).all()
|
badmins = g.db.query(User).filter_by(admin_level=6).all()
|
||||||
return {
|
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]})
|
"api":lambda:jsonify({"data":[x.json for x in badmins]})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue