mirror of
https://github.com/Balshgit/mosgortrans.git
synced 2025-09-11 13:00:40 +03:00
not working again
This commit is contained in:
parent
e3d388f208
commit
cb22194067
14
app/main.py
14
app/main.py
@ -7,13 +7,7 @@ from aiohttp import web
|
||||
from app.core.bot import bot, dispatcher
|
||||
from app.core.logger import logger
|
||||
from app.core.scheduler import asyncio_schedule
|
||||
from app.settings import (
|
||||
START_WITH_WEBHOOK,
|
||||
WEBAPP_HOST,
|
||||
WEBAPP_PORT,
|
||||
WEBHOOK_PATH,
|
||||
WEBHOOK_URL,
|
||||
)
|
||||
from app.settings import START_WITH_WEBHOOK, WEBAPP_HOST, WEBAPP_PORT, WEBHOOK_URL
|
||||
|
||||
|
||||
async def bot_startup() -> None:
|
||||
@ -81,9 +75,15 @@ async def webhook(request: web.Request) -> web.Response:
|
||||
return web.Response(status=HTTPStatus.OK)
|
||||
|
||||
|
||||
async def hello_world(request: web.Request) -> web.Response:
|
||||
logger.info(request)
|
||||
return web.Response(body='Hello World')
|
||||
|
||||
|
||||
async def create_app() -> web.Application:
|
||||
application = web.Application()
|
||||
application.router.add_post('/', webhook)
|
||||
application.router.add_post('/hello', hello_world)
|
||||
application.on_startup.append(on_startup_gunicorn)
|
||||
application.on_shutdown.append(on_shutdown_gunicorn)
|
||||
return application
|
||||
|
Loading…
x
Reference in New Issue
Block a user