mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix(types): align request middleware typing with actual return value
Refs: #1723
This commit is contained in:
parent
ec7da0f678
commit
00026a29f5
4 changed files with 10 additions and 10 deletions
|
|
@ -35,7 +35,7 @@ Register using decorator
|
|||
make_request: NextRequestMiddlewareType[TelegramType],
|
||||
bot: "Bot",
|
||||
method: TelegramMethod[TelegramType],
|
||||
) -> Response[TelegramType]:
|
||||
) -> TelegramType:
|
||||
# do something with request
|
||||
return await make_request(bot, method)
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ Function based session middleware
|
|||
make_request: NextRequestMiddlewareType[TelegramType],
|
||||
bot: "Bot",
|
||||
method: TelegramMethod[TelegramType],
|
||||
) -> Response[TelegramType]:
|
||||
) -> TelegramType:
|
||||
try:
|
||||
# do something with request
|
||||
return await make_request(bot, method)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue