mirror of
https://github.com/aljazceru/CTFd.git
synced 2026-01-28 10:24:23 +01:00
Adding user deletion from admin panel
This commit is contained in:
@@ -286,6 +286,14 @@ def init_admin(app):
|
||||
db.session.commit()
|
||||
return redirect('/scoreboard')
|
||||
|
||||
@app.route('/admin/team/<teamid>/delete', methods=['POST'])
|
||||
@admins_only
|
||||
def delete_team(teamid):
|
||||
user = Teams.query.filter_by(id=teamid).first()
|
||||
db.session.delete(user)
|
||||
db.session.commit()
|
||||
return '1'
|
||||
|
||||
|
||||
@app.route('/admin/graphs/<graph_type>')
|
||||
@admins_only
|
||||
|
||||
Reference in New Issue
Block a user