[routes] skip acls that are falsy

This commit is contained in:
Maxime Alves LIRMM 2020-10-07 15:50:50 +02:00
parent 63b73a2bc1
commit 1e1ff2fb69
2 changed files with 1 additions and 2 deletions

View File

@ -96,7 +96,7 @@ def api_routes(m_dom: ModuleType) -> Generator:
l_params = [] l_params = []
for param in params: for param in params:
if 'acl' not in param.keys(): if 'acl' not in param.keys() or not param['acl']:
continue continue
l_params.append(param.copy()) l_params.append(param.copy())

View File

@ -39,7 +39,6 @@ async def get_api_routes(request, *args, **kwargs):
description: Returns the current API routes description (HalfAPI 0.2.1) description: Returns the current API routes description (HalfAPI 0.2.1)
as a JSON object as a JSON object
""" """
assert 'api' in request.scope
return ORJSONResponse(request.scope['api']) return ORJSONResponse(request.scope['api'])