Browse Source

Moved /goals and /votes routes from webhooks.py to web_panels.py

deadtom 2 weeks ago
parent
commit
99bc96b126
2 changed files with 15 additions and 15 deletions
  1. 15 0
      ownchatbot/web_panels.py
  2. 0 15
      ownchatbot/webhooks.py

+ 15 - 0
ownchatbot/web_panels.py

@@ -542,3 +542,18 @@ def clearfulfilled():
 def clear_queue():
     clear_reward_queue()
     return redirect(url_for('web_panels.mgmtqueue'))
+
+
+@ocb.route('/goals', methods=['GET'])  # Route for goals overlay
+def goals():
+    db = get_db()
+    return render_template('goals.html',
+                           goals=all_active_goals(db),
+                           rewards=all_active_rewards())
+
+
+@ocb.route('/votes', methods=['GET'])  # Route for votes overlay
+def votes():
+    db = get_db()
+    return render_template('votes.html',
+                           votes=all_active_votes(db))

+ 0 - 15
ownchatbot/webhooks.py

@@ -145,21 +145,6 @@ def chat_hook():
     return data
 
 
-@ocb.route('/goals', methods=['GET'])  # Route for goals overlay
-def goals():
-    db = get_db()
-    return render_template('goals.html',
-                           goals=all_active_goals(db),
-                           rewards=all_active_rewards())
-
-
-@ocb.route('/votes', methods=['GET'])  # Route for votes overlay
-def votes():
-    db = get_db()
-    return render_template('votes.html',
-                           votes=all_active_votes(db))
-
-
 @ocb.route('/newFollow', methods=['POST'])  # Nothing implemented here, YET.
 def new_follow():
     data = request.json