fix(blueprints): @middleware IndexError (#139)
This commit is contained in:
parent
ce8742c605
commit
1b65b2e0c6
|
@ -109,8 +109,9 @@ class Blueprint:
|
|||
|
||||
# Detect which way this was called, @middleware or @middleware('AT')
|
||||
if len(args) == 1 and len(kwargs) == 0 and callable(args[0]):
|
||||
middleware = args[0]
|
||||
args = []
|
||||
return register_middleware(args[0])
|
||||
return register_middleware(middleware)
|
||||
else:
|
||||
return register_middleware
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user