remotes/1693045480750635534/spooky-22
parent
a22b2c8275
commit
0ec50061a0
|
@ -38,6 +38,7 @@ class Comment(Base, Age_times, Scores, Stndrd, Fuzzing):
|
||||||
created_utc = Column(Integer, default=0)
|
created_utc = Column(Integer, default=0)
|
||||||
edited_utc = Column(Integer, default=0)
|
edited_utc = Column(Integer, default=0)
|
||||||
is_banned = Column(Boolean, default=False)
|
is_banned = Column(Boolean, default=False)
|
||||||
|
removed_by = Column(int)
|
||||||
bannedfor = Column(Boolean)
|
bannedfor = Column(Boolean)
|
||||||
distinguish_level = Column(Integer, default=0)
|
distinguish_level = Column(Integer, default=0)
|
||||||
deleted_utc = Column(Integer, default=0)
|
deleted_utc = Column(Integer, default=0)
|
||||||
|
|
|
@ -44,6 +44,7 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
|
||||||
created_utc = Column(BigInteger, default=0)
|
created_utc = Column(BigInteger, default=0)
|
||||||
thumburl = Column(String)
|
thumburl = Column(String)
|
||||||
is_banned = Column(Boolean, default=False)
|
is_banned = Column(Boolean, default=False)
|
||||||
|
removed_by = Column(int)
|
||||||
bannedfor = Column(Boolean)
|
bannedfor = Column(Boolean)
|
||||||
processing = Column(Boolean, default=False)
|
processing = Column(Boolean, default=False)
|
||||||
views = Column(Integer, default=0)
|
views = Column(Integer, default=0)
|
||||||
|
|
|
@ -23,6 +23,16 @@ from files.helpers.discord import add_role
|
||||||
|
|
||||||
IMGUR_KEY = environ.get("IMGUR_KEY", "").strip()
|
IMGUR_KEY = environ.get("IMGUR_KEY", "").strip()
|
||||||
|
|
||||||
|
@app.post("/@<username>/revert_actions")
|
||||||
|
@admin_level_required(6)
|
||||||
|
def revert_actions(v, username):
|
||||||
|
user = get_user(username)
|
||||||
|
if not user: abort(404)
|
||||||
|
items = g.db.query(Submission, Comment).options(lazyload('*')).all()
|
||||||
|
print(items)
|
||||||
|
|
||||||
|
return {"message": "User has been made admin!"}
|
||||||
|
|
||||||
@app.post("/@<username>/make_admin")
|
@app.post("/@<username>/make_admin")
|
||||||
@admin_level_required(6)
|
@admin_level_required(6)
|
||||||
def make_admin(v, username):
|
def make_admin(v, username):
|
||||||
|
|
|
@ -462,6 +462,7 @@
|
||||||
{% elif v.id == 10 %}
|
{% elif v.id == 10 %}
|
||||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_admin')">Remove admin</a>
|
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_admin')">Remove admin</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if 'rdrama' in request.host and v.id in [28,29,995] %}
|
{% if 'rdrama' in request.host and v.id in [28,29,995] %}
|
||||||
|
@ -473,6 +474,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_admin')">Remove admin</a>
|
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_admin')">Remove admin</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if 'rdrama' not in request.host and 'pcm' not in request.host and v.admin_level == 6 %}
|
{% if 'rdrama' not in request.host and 'pcm' not in request.host and v.admin_level == 6 %}
|
||||||
|
@ -481,6 +483,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_admin')">Remove admin</a>
|
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_admin')">Remove admin</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/revert_actions')">Revert admin actions</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form class="d-none profile-toggleable-mobile" id='message-mobile' action="/@{{u.username}}/message" method="post">
|
<form class="d-none profile-toggleable-mobile" id='message-mobile' action="/@{{u.username}}/message" method="post">
|
||||||
|
|
Loading…
Reference in New Issue