forked from MarseyWorld/MarseyWorld
dffd
parent
ddc8738bd7
commit
0015b395f3
|
@ -20,6 +20,15 @@ from files.__main__ import app, cache, limiter
|
|||
from .front import frontlist
|
||||
from files.helpers.discord import add_role
|
||||
|
||||
@app.post("/@<username>/make_admin")
|
||||
@admin_level_required(6)
|
||||
def make_admin(v, username):
|
||||
user = get_user(username)
|
||||
if not user: abort(404)
|
||||
user.admin_level = 6
|
||||
g.db.add(user)
|
||||
return "", 204
|
||||
|
||||
@app.get("/admin/shadowbanned")
|
||||
@auth_required
|
||||
def shadowbanned(v):
|
||||
|
|
|
@ -410,7 +410,9 @@
|
|||
<a class="btn btn-primary" href="javascript:void(0)" onclick="toggleElement('profile-toggleable-mobile', 'message-mobile')">Message</a>
|
||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/suicide')">Get them help</a>
|
||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="toggleElement('profile-toggleable-mobile', 'coin-transfer-mobile')">Gift {{"COINS_NAME" | app_config}}</a>
|
||||
|
||||
{% if v.admin_level == 6 and 'rdrama' not in request.host %}
|
||||
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/make_admin')">Make admin</a>
|
||||
{% endif %}
|
||||
<form class="d-none profile-toggleable-mobile" id='message-mobile' action="/@{{u.username}}/message" method="post">
|
||||
<pre></pre>
|
||||
<textarea id="input-message-mobile" form="message-mobile" name="message" rows="3" maxlength="1000" class="form-control" required></textarea>
|
||||
|
|
Loading…
Reference in New Issue