Fix the API discovery method to not rely on globals().
This commit is contained in:
parent
c919b9321b
commit
44fe17754a
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ def get_route_data():
|
|||
routes = []
|
||||
for rule in app.url_map.iter_rules():
|
||||
if rule.endpoint.startswith('api.'):
|
||||
endpoint_method = globals()[rule.endpoint[4:]] # Remove api.
|
||||
endpoint_method = app.view_functions[rule.endpoint]
|
||||
is_internal = '__internal_call' in dir(endpoint_method)
|
||||
is_org_api = '__user_call' in dir(endpoint_method)
|
||||
methods = list(rule.methods.difference(['HEAD', 'OPTIONS']))
|
||||
|
|
Reference in a new issue