From 802488d025bbc9edeb9739d9932045e75503a80f Mon Sep 17 00:00:00 2001 From: "Diccion, Kaeren C (UG - Computer Science)" <kd00450@surrey.ac.uk> Date: Fri, 12 Mar 2021 13:56:42 +0000 Subject: [PATCH] Update showtimes.py --- showtimes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/showtimes.py b/showtimes.py index b5c1864..8e90758 100644 --- a/showtimes.py +++ b/showtimes.py @@ -13,7 +13,7 @@ with open("{}/database/showtimes.json".format(os.getcwd()), "r") as f: @app.route("/", methods=['GET']) def hello(): - return json.dump({ + return json.dumps({ "uri": "/", "subresource_uris": { "showtimes": "/showtimes", @@ -24,7 +24,7 @@ def hello(): @app.route("/showtimes", methods=['GET']) def showtimes_list(): - return json.dump(showtimes) + json.dumps(showtimes) @app.route("/showtimes/<date>", methods=['GET']) @@ -32,7 +32,7 @@ def showtimes_record(date): if date not in showtimes: raise NotFound print(showtimes[date]) - return json.dump(showtimes[date]) + return json.dumps(showtimes[date]) if __name__ == "__main__": app.run(port=5002, debug=True) -- GitLab