Skip to content

Commit eab4e0f

Browse files
authored
fix: make passing a nxt function to middleware optional (#117)
2 parents 1c87065 + a7ac166 commit eab4e0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nitric/faas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ class FaasWorkerOptions:
511511
class Middleware(Protocol, Generic[C]):
512512
"""A middleware function."""
513513

514-
async def __call__(self, ctx: C, nxt: Optional[Middleware[C]]) -> C:
514+
async def __call__(self, ctx: C, nxt: Optional[Middleware[C]] = None) -> C:
515515
"""Process trigger context."""
516516
...
517517

0 commit comments

Comments
 (0)