diff --git a/app/main.py b/app/main.py index 32cd17b..0e39c3e 100644 --- a/app/main.py +++ b/app/main.py @@ -462,7 +462,7 @@ async def request_access(request: Request, db: Session = Depends(get_db)): ) if not TELEGRAM_BOT_TOKEN or not TELEGRAM_CHAT_ID: - log_event("telegram_not_configured", {}) + log_event("telegram_not_configured") return {"ok": True} try: @@ -476,7 +476,7 @@ async def request_access(request: Request, db: Session = Depends(get_db)): with _urllib_request.urlopen(req, timeout=10) as resp: resp.read() except Exception as e: - log_event("telegram_send_error", {"error": str(e)}) + log_event("telegram_send_error", error=str(e)) raise HTTPException(status_code=502, detail="Ошибка отправки запроса") return {"ok": True} diff --git a/docker-compose.yml b/docker-compose.yml index 4020972..384b50e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -57,6 +57,9 @@ services: WEB_RESOLUTION_MAX_WIDTH: ${WEB_RESOLUTION_MAX_WIDTH:-3840} WEB_RESOLUTION_MAX_HEIGHT: ${WEB_RESOLUTION_MAX_HEIGHT:-2160} ENABLE_STARTUP_MAINTENANCE: ${ENABLE_STARTUP_MAINTENANCE:-0} + TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-} + TELEGRAM_CHAT_ID: ${TELEGRAM_CHAT_ID:-} + TELEGRAM_API_URL: ${TELEGRAM_API_URL:-https://api.telegram.org/bot} depends_on: - db volumes: @@ -107,6 +110,9 @@ services: WEB_RESOLUTION_MAX_WIDTH: ${WEB_RESOLUTION_MAX_WIDTH:-3840} WEB_RESOLUTION_MAX_HEIGHT: ${WEB_RESOLUTION_MAX_HEIGHT:-2160} ENABLE_STARTUP_MAINTENANCE: ${ENABLE_STARTUP_MAINTENANCE:-0} + TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-} + TELEGRAM_CHAT_ID: ${TELEGRAM_CHAT_ID:-} + TELEGRAM_API_URL: ${TELEGRAM_API_URL:-https://api.telegram.org/bot} depends_on: - db volumes: