15 lines
319 B
Python
15 lines
319 B
Python
from aiohttp import web
|
|
|
|
from phi.logging import get_logger
|
|
from phi.api.routes import api_routes
|
|
|
|
log = get_logger(__name__)
|
|
|
|
|
|
def api_app(ldap_client=None):
|
|
log.info("Initializing API sub-app.")
|
|
app = web.Application()
|
|
app.router.add_routes(api_routes)
|
|
app['ldap_client'] = ldap_client
|
|
return app
|