From bc9739d4d3e51dc1eee369d20271fb2b693115a4 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 03:01:41 +0100 Subject: Added README --- server/server.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server') diff --git a/server/server.py b/server/server.py index f1ddaa9..ca28d51 100644 --- a/server/server.py +++ b/server/server.py @@ -1,3 +1,5 @@ +import time + from datetime import datetime from flask import abort, Flask, jsonify from flask_cors import CORS @@ -11,12 +13,15 @@ CORS(app) @app.route('/zones/', methods=['GET']) def zones(): """ Return a list of common timezones """ + # time.sleep(5) # Simulate slow connection return jsonify(common_timezones) @app.route('/time-at/', methods=['GET']) def time_at(zone): """ Return current time at given timezone """ + # time.sleep(5) # Simulate slow connection + if zone not in common_timezones: abort(404) -- cgit v1.2.1