Fix request-access: add Telegram env to compose, fix log_event calls

This commit is contained in:
2026-05-14 06:28:58 +00:00
parent a0b1754ddb
commit beb2781123
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -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}