[router][api] Fix GET /

This commit is contained in:
Joël Maïzi 2020-09-29 15:08:35 +02:00
parent 0a94f71dad
commit 7d6bc2c181
2 changed files with 4 additions and 4 deletions

1
.gitignore vendored
View File

@ -137,3 +137,4 @@ dmypy.json
cython_debug/ cython_debug/
domains/ domains/
.vscode

View File

@ -108,11 +108,12 @@ def api_routes(m_dom: ModuleType) -> Generator:
return r return r
def str_acl(params): def str_acl(params):
l_params = []
for param in params: for param in params:
if 'acl' not in param.keys(): if 'acl' not in param.keys():
continue continue
param['acl'] = param['acl'].__name__ l_params.append({'acl': param['acl'].__name__})
return params return l_params
d_res = {} d_res = {}
for path, d_route in gen_domain_routes(m_dom.__name__): for path, d_route in gen_domain_routes(m_dom.__name__):
@ -123,6 +124,4 @@ def api_routes(m_dom: ModuleType) -> Generator:
continue continue
d_res[path][verb] = str_acl(d_route[verb]['params']) d_res[path][verb] = str_acl(d_route[verb]['params'])
print(d_res)
return d_res return d_res