diff --git a/main.py b/main.py index 95e3fd4..3f0ff76 100644 --- a/main.py +++ b/main.py @@ -491,6 +491,16 @@ def admin_unban_user(user_id): flash(str(e), 'error') return redirect(url_for('admin')) +@app.route('/admin/restart/', methods = ['POST']) +def admin_restart(): + chk, user = _admin_check() + if not chk: + return user + + restart() + return redirect(url_for('admin')) + + def _admin_check(): user = get_user() if user is None: diff --git a/templates/admin/index.html b/templates/admin/index.html index 1ee7284..287a7f7 100644 --- a/templates/admin/index.html +++ b/templates/admin/index.html @@ -29,6 +29,11 @@
++
+