diff --git a/templates/bot_create.html b/templates/bot_create.html
index 533e391..3f84fc7 100644
--- a/templates/bot_create.html
+++ b/templates/bot_create.html
@@ -40,7 +40,7 @@
Cancel
{% if session['step'] != 1 %}
-
+
Back
{% endif %}
{% if session['step'] < 5 %}
diff --git a/webui.py b/webui.py
index 7b31517..a492f68 100644
--- a/webui.py
+++ b/webui.py
@@ -41,6 +41,7 @@ def home():
bot_users = {}
for bot in bots:
+ # multiple SELECTS is slow, maybe SELECT all at once and filter with python?
c.execute("SELECT COUNT(*) FROM `bot_learned_accounts` WHERE bot_id = %s", (bot['id'],))
bot_users[bot['id']] = c.fetchone()[0]
@@ -187,6 +188,11 @@ def bot_create():
return render_template("bot_create.html")
+@app.route("/bot/create/back")
+def bot_create_back():
+ session['step'] -= 1
+ return redirect(url_for("bot_create"), 303)
+
@app.route("/do/authenticate_bot")
def do_authenticate_bot():
session['code'] = request.args.get('code')