summaryrefslogtreecommitdiffstats
path: root/bitvend/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitvend/admin.py')
-rw-r--r--bitvend/admin.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/bitvend/admin.py b/bitvend/admin.py
index c803181..e36412e 100644
--- a/bitvend/admin.py
+++ b/bitvend/admin.py
@@ -1,6 +1,7 @@
from flask import Blueprint, render_template, redirect, request, flash, url_for
from flask_login import current_user, fresh_login_required
+from bitvend import dev
from bitvend.models import db, Transaction
from bitvend.forms import ManualForm
from spaceauth import cap_required
@@ -31,3 +32,21 @@ def transactions(page):
return render_template('admin/transactions.html',
transactions=Transaction.query.paginate(page)
)
+
+
+@bp.route('/begin')
+@fresh_login_required
+@admin_required
+def begin():
+ dev.begin_session(500)
+ flash('Operation successful.', 'success')
+ return redirect('/')
+
+
+@bp.route('/cancel')
+@fresh_login_required
+@admin_required
+def cancel():
+ dev.cancel_session()
+ flash('Operation successful.', 'success')
+ return redirect('/')