@@ -1694,26 +1694,27 @@ def __init__(self, app,
1694
1694
"""Constructor of :class:`AsgiFunctionApp` object.
1695
1695
1696
1696
:param app: asgi app object.
1697
+ :param http_auth_level: Determines what keys, if any, need to be
1698
+ present
1699
+ on the request in order to invoke the function.
1697
1700
"""
1698
1701
super ().__init__ (auth_level = http_auth_level )
1699
- self ._add_http_app (AsgiMiddleware (app ), 'asgi' )
1702
+ self ._add_http_app (AsgiMiddleware (app ))
1700
1703
1701
- def _add_http_app (self ,
1702
- http_middleware : AsgiMiddleware ,
1703
- http_type : str ) -> None :
1704
+ def _add_http_app (self , asgi_middleware : AsgiMiddleware ) -> None :
1704
1705
"""Add an Asgi app integrated http function.
1705
1706
1706
- :param http_middleware : :class:`AsgiMiddleware` instance.
1707
+ :param asgi_middleware : :class:`AsgiMiddleware` instance.
1707
1708
1708
1709
:return: None
1709
1710
"""
1710
1711
1711
- @self .http_type (http_type = http_type )
1712
+ @self .http_type (http_type = 'asgi' )
1712
1713
@self .route (methods = (method for method in HttpMethod ),
1713
1714
auth_level = self .auth_level ,
1714
1715
route = "/{*route}" )
1715
1716
async def http_app_func (req : HttpRequest , context : Context ):
1716
- return await http_middleware .handle_async (req , context )
1717
+ return await asgi_middleware .handle_async (req , context )
1717
1718
1718
1719
1719
1720
class WsgiFunctionApp (ExternalHttpFunctionApp ):
@@ -1724,21 +1725,20 @@ def __init__(self, app,
1724
1725
:param app: wsgi app object.
1725
1726
"""
1726
1727
super ().__init__ (auth_level = http_auth_level )
1727
- self ._add_http_app (WsgiMiddleware (app ), 'wsgi' )
1728
+ self ._add_http_app (WsgiMiddleware (app ))
1728
1729
1729
1730
def _add_http_app (self ,
1730
- http_middleware : WsgiMiddleware ,
1731
- http_type : str ) -> None :
1731
+ wsgi_middleware : WsgiMiddleware ) -> None :
1732
1732
"""Add a Wsgi app integrated http function.
1733
1733
1734
- :param http_middleware : :class:`WsgiMiddleware` instance.
1734
+ :param wsgi_middleware : :class:`WsgiMiddleware` instance.
1735
1735
1736
1736
:return: None
1737
1737
"""
1738
1738
1739
- @self .http_type (http_type = http_type )
1739
+ @self .http_type (http_type = 'wsgi' )
1740
1740
@self .route (methods = (method for method in HttpMethod ),
1741
1741
auth_level = self .auth_level ,
1742
1742
route = "/{*route}" )
1743
1743
def http_app_func (req : HttpRequest , context : Context ):
1744
- return http_middleware .handle (req , context )
1744
+ return wsgi_middleware .handle (req , context )
0 commit comments