Skip to content

Commit

Permalink
better?
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Reynolds committed Aug 21, 2024
1 parent 371c0c0 commit 715c9c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions base/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down

0 comments on commit 715c9c0

Please sign in to comment.