diff --git a/showtimes.py b/showtimes.py index f4d236c65b6f21fe34daff95347a0a0d3687f4ed..7136f94ed527b96420ce47d97b837ea3dfdf6529 100644 --- a/showtimes.py +++ b/showtimes.py @@ -1,4 +1,4 @@ -from services import root_dir, nice_json +#from services import root_dir, nice_json from flask import Flask from werkzeug.exceptions import NotFound import json @@ -13,7 +13,7 @@ with open("{}/database/showtimes.json".format(os.getcwd()), "r") as f: @app.route("/", methods=['GET']) def hello(): - return nice_json({ + return json.dump({ "uri": "/", "subresource_uris": { "showtimes": "/showtimes", @@ -24,7 +24,7 @@ def hello(): @app.route("/showtimes", methods=['GET']) def showtimes_list(): - nice_json(showtimes) + json.dump(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 nice_json(showtimes[date]) + return json.dump(showtimes[date]) if __name__ == "__main__": app.run(port=5002, debug=True)