mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add type-checking to webhook (parse_update)
This commit is contained in:
parent
96ebee26e4
commit
d888c7d419
1 changed files with 2 additions and 0 deletions
|
|
@ -116,6 +116,8 @@ class WebhookRequestHandler(web.View):
|
|||
:return: :class:`aiogram.types.Update`
|
||||
"""
|
||||
data = await self.request.json()
|
||||
if isinstance(data, list):
|
||||
data = data[0]
|
||||
return types.Update(**data)
|
||||
|
||||
async def post(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue