Skip to content

Commit 2311428

Browse files
committed
fix: add missing endpoint parameter to Route constructors in ASGI
1 parent bd17bcf commit 2311428

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/functions_framework/aio/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,14 @@ def create_asgi_app(target=None, source=None, signature_type=None):
197197
routes.append(
198198
Route(
199199
"/{path:path}",
200-
http_handler,
200+
endpoint=http_handler,
201201
methods=["GET", "POST", "PUT", "DELETE", "OPTIONS", "HEAD", "PATCH"],
202202
)
203203
)
204204
elif signature_type == _function_registry.CLOUDEVENT_SIGNATURE_TYPE:
205205
cloudevent_handler = _cloudevent_func_wrapper(function, is_async)
206-
routes.append(Route("/{path:path}", cloudevent_handler, methods=["POST"]))
207-
routes.append(Route("/", cloudevent_handler, methods=["POST"]))
206+
routes.append(Route("/{path:path}", endpoint=cloudevent_handler, methods=["POST"]))
207+
routes.append(Route("/", endpoint=cloudevent_handler, methods=["POST"]))
208208
elif signature_type == _function_registry.TYPED_SIGNATURE_TYPE:
209209
raise FunctionsFrameworkException(
210210
f"ASGI server does not support typed events (signature type: '{signature_type}'). "

0 commit comments

Comments
 (0)