mirror of
https://github.com/civsocit/olgram.git
synced 2023-07-22 01:29:12 +03:00
test
This commit is contained in:
parent
44fe878f08
commit
c620fb60b9
@ -52,7 +52,7 @@ class CustomRequestHandler(WebhookRequestHandler):
|
|||||||
self._dispatcher = None
|
self._dispatcher = None
|
||||||
super(CustomRequestHandler, self).__init__(*args, **kwargs)
|
super(CustomRequestHandler, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
def _create_dispatcher(self):
|
async def _create_dispatcher(self):
|
||||||
key = self.request.url.path[1:]
|
key = self.request.url.path[1:]
|
||||||
|
|
||||||
bot = await Bot.filter(code=key).first()
|
bot = await Bot.filter(code=key).first()
|
||||||
@ -65,10 +65,10 @@ class CustomRequestHandler(WebhookRequestHandler):
|
|||||||
|
|
||||||
return dp
|
return dp
|
||||||
|
|
||||||
def post(self):
|
async def post(self):
|
||||||
# TODO: refactor
|
# TODO: refactor
|
||||||
self._dispatcher = self._create_dispatcher()
|
self._dispatcher = await self._create_dispatcher()
|
||||||
super(CustomRequestHandler, self).post()
|
await super(CustomRequestHandler, self).post()
|
||||||
self._dispatcher = None
|
self._dispatcher = None
|
||||||
|
|
||||||
def get_dispatcher(self):
|
def get_dispatcher(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user