master
Aevann1 2021-10-04 23:17:35 +02:00
parent 7172854e78
commit b51486e751
1 changed files with 6 additions and 4 deletions

View File

@ -742,9 +742,10 @@ def agendaposter(user_id, v):
else: send_notification(NOTIFICATIONS_ACCOUNT, user, f"You have been unmarked by an admin as an agendaposter.")
g.db.commit()
if user.agendaposter: return (redirect(user.url), user)
if user.agendaposter: return redirect(user.url)
return {"message": "Agendaposter theme disabled!"}
@app.post("/shadowban/<user_id>")
@admin_level_required(6)
@validate_formkey
@ -846,8 +847,7 @@ def admin_title_change(user_id, v):
g.db.add(ma)
g.db.commit()
if 'redir' in request.values: return (redirect(user.url), user)
else: return {"message": f"@{user.username} was unbanned!"}
return redirect(user.url)
@app.post("/ban_user/<user_id>")
@admin_level_required(6)
@ -920,7 +920,7 @@ def ban_user(user_id, v):
except: pass
g.db.commit()
if 'redir' in request.values: return (redirect(user.url), user)
if 'redir' in request.values: redirect(user.url)
else: return {"message": f"@{user.username} was banned!"}
@ -960,6 +960,7 @@ def unban_user(user_id, v):
if "@" in request.referrer: return redirect(user.url)
else: return {"message": f"@{user.username} was unbanned!"}
@app.post("/ban_post/<post_id>")
@admin_level_required(3)
@validate_formkey
@ -1238,6 +1239,7 @@ def admin_nuke_user(v):
return redirect(user.url)
@app.post("/admin/unnuke_user")
@admin_level_required(4)
@validate_formkey