From 371c0c04f0d8da282957f60117d75d2359c2ef5c Mon Sep 17 00:00:00 2001 From: Kevin Reynolds Date: Wed, 21 Aug 2024 08:29:32 -0400 Subject: [PATCH] test then ship --- base/app/app.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/base/app/app.py b/base/app/app.py index 22325fc..7eab8f1 100644 --- a/base/app/app.py +++ b/base/app/app.py @@ -241,6 +241,18 @@ def main(): app = Flask(__name__) + @app.route('/') + def index(): + """Return a list of all API endpoints.""" + endpoints = {} + for rule in app.url_map.iter_rules(): + if rule.endpoint != 'static': + endpoints[rule.rule] = { + "methods": list(rule.methods), + "endpoint": rule.endpoint + } + return jsonify(endpoints) + @app.route('/status', methods=['GET']) def status(): return jsonify({"status": "running"}), 200