From 715c9c030f47203dcd6c87672586edaf86ca964b Mon Sep 17 00:00:00 2001 From: Kevin Reynolds Date: Wed, 21 Aug 2024 08:33:28 -0400 Subject: [PATCH] better? --- base/app/app.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/base/app/app.py b/base/app/app.py index 7eab8f1..82fd9b4 100644 --- a/base/app/app.py +++ b/base/app/app.py @@ -244,13 +244,13 @@ def main(): @app.route('/') def index(): """Return a list of all API endpoints.""" - endpoints = {} + endpoints = [] for rule in app.url_map.iter_rules(): if rule.endpoint != 'static': - endpoints[rule.rule] = { - "methods": list(rule.methods), - "endpoint": rule.endpoint - } + endpoints.append({ + "route": rule.rule, + "methods": list(rule.methods) + }) return jsonify(endpoints) @app.route('/status', methods=['GET'])