From c620fb60b9f58c74d26a1ccbdce5a8ecdf93b53c Mon Sep 17 00:00:00 2001 From: mihalin Date: Fri, 10 Sep 2021 00:35:36 +0300 Subject: [PATCH] test --- server/server.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/server.py b/server/server.py index bc99a64..645d921 100644 --- a/server/server.py +++ b/server/server.py @@ -52,7 +52,7 @@ class CustomRequestHandler(WebhookRequestHandler): self._dispatcher = None super(CustomRequestHandler, self).__init__(*args, **kwargs) - def _create_dispatcher(self): + async def _create_dispatcher(self): key = self.request.url.path[1:] bot = await Bot.filter(code=key).first() @@ -65,10 +65,10 @@ class CustomRequestHandler(WebhookRequestHandler): return dp - def post(self): + async def post(self): # TODO: refactor - self._dispatcher = self._create_dispatcher() - super(CustomRequestHandler, self).post() + self._dispatcher = await self._create_dispatcher() + await super(CustomRequestHandler, self).post() self._dispatcher = None def get_dispatcher(self):