Skip to content
Snippets Groups Projects
Commit 802488d0 authored by Diccion, Kaeren C (UG - Computer Science)'s avatar Diccion, Kaeren C (UG - Computer Science)
Browse files

Update showtimes.py

parent c9bac0b8
No related branches found
No related tags found
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment