Skip to content

Commit

Permalink
put API Version outside of stream list (#8)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas <[email protected]>
  • Loading branch information
qamodi and linuro authored Apr 5, 2021
1 parent 7e16ef2 commit 7ffbccb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions frontend/app/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down

0 comments on commit 7ffbccb

Please sign in to comment.