From 26b34801ca54cbeca78c6807a14ed7822ebe9c3f Mon Sep 17 00:00:00 2001 From: leonoverweel Date: Sat, 1 Apr 2017 16:14:03 +0200 Subject: Add /api path to Flask app --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 56f8e7c1..600aea92 100644 --- a/main.py +++ b/main.py @@ -102,6 +102,12 @@ def sign_in(): return jsonify(**data) +@FLASK_CORE_APP.route('/api/') +def api_call(endpoint_path): + """Call an API endpoint directly over HTTP""" + + return endpoint_path + @SOCKET_IO_CORE.on('request') def receive_message(message): """"Receive a SocketIO request""" @@ -149,4 +155,3 @@ def receive_message(message): SOCKET_IO_CORE.run(FLASK_CORE_APP, host='0.0.0.0', port=8081) - -- cgit v1.2.3