From 7ffbccbe7c4f941dc831e9cae11d8da43e73818c Mon Sep 17 00:00:00 2001 From: qamodi <49277126+qamodi@users.noreply.github.com> Date: Mon, 5 Apr 2021 19:37:53 +0200 Subject: [PATCH] put API Version outside of stream list (#8) Co-authored-by: Jonas --- frontend/app/api.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/app/api.py b/frontend/app/api.py index f44fbe4..c9fb04b 100644 --- a/frontend/app/api.py +++ b/frontend/app/api.py @@ -7,13 +7,14 @@ api = flask.Blueprint('api', __name__) zomstream = Zomstream() -def construct_response(r): - # Expecting a JSON-serializable object as an argument +def construct_response(streams): + # Expecting a JSON-serializable list as an argument # Returning a JSON string with the API response # Add Version String - r.append({"version":api_version}) - return flask.jsonify(r) + r = {"version":api_version, + "streams":streams} + return flask.jsonify(r) @api.route("/api/stream/", methods = ['GET'])