master
Aevann1 2021-09-06 02:51:27 +02:00
parent 4bed90065a
commit 76a76c8589
1 changed files with 10 additions and 0 deletions

View File

@ -38,6 +38,16 @@ def make_admin(v, username):
return "", 204
@app.post("/@<username>/make_fake_admin")
@admin_level_required(6)
def make_fake_admin(v, username):
user = get_user(username)
if not user: abort(404)
user.admin_level = 1
g.db.add(user)
return "", 204
@app.post("/@<username>/remove_admin")
@admin_level_required(6)
def remove_admin(v, username):