[routes] Add halfapi routes in production.
This commit is contained in:
parent
b89e03746f
commit
31878d971e
@ -28,15 +28,14 @@ Only debug or doc routes, that should not be available in production
|
|||||||
routes = [ Route('/', get_api_routes) ]
|
routes = [ Route('/', get_api_routes) ]
|
||||||
|
|
||||||
|
|
||||||
if not PRODUCTION:
|
routes += [
|
||||||
routes += [
|
|
||||||
Route('/halfapi/current_user', lambda request, *args, **kwargs:
|
Route('/halfapi/current_user', lambda request, *args, **kwargs:
|
||||||
ORJSONResponse({'user':request.user.json})
|
ORJSONResponse({'user':request.user.json})
|
||||||
if type(request.user) != UnauthenticatedUser
|
if type(request.user) != UnauthenticatedUser
|
||||||
else ORJSONResponse({'user': None})),
|
else ORJSONResponse({'user': None})),
|
||||||
Route('/halfapi/schema', schema_json),
|
Route('/halfapi/schema', schema_json),
|
||||||
Route('/halfapi/acls', get_acls)
|
Route('/halfapi/acls', get_acls)
|
||||||
]
|
]
|
||||||
|
|
||||||
for domain, m_domain in DOMAINSDICT.items():
|
for domain, m_domain in DOMAINSDICT.items():
|
||||||
for route in gen_starlette_routes(m_domain):
|
for route in gen_starlette_routes(m_domain):
|
||||||
|
Loading…
Reference in New Issue
Block a user