Spaces:
Running
Running
Download backend/check_webhook.py from axeronis/microfunnel-api: direct link, hf CLI and curl.
- Browser
- Download file 805 Bytes
-
https://huggingface.co/spaces/axeronis/microfunnel-api/resolve/main/backend/check_webhook.py
- Command line
-
hf download hf://spaces/axeronis/microfunnel-api/backend/check_webhook.py
-
curl -L -o check_webhook.py https://huggingface.co/spaces/axeronis/microfunnel-api/resolve/main/backend/check_webhook.py
805 Bytes
| """Check webhook configuration""" | |
| from app.core.config import settings | |
| from sqlalchemy import create_engine, text | |
| engine = create_engine(settings.DATABASE_URL) | |
| with engine.connect() as conn: | |
| result = conn.execute(text('SELECT id, business_name, telegram_bot_token, webhook_url FROM tenants LIMIT 1')) | |
| row = result.fetchone() | |
| if row: | |
| print(f"✅ Tenant: {row[1]}") | |
| print(f"🤖 Bot token: {row[2][:30] if row[2] else 'NONE'}...") | |
| print(f"🌐 Webhook URL: {row[3] or 'NOT SET'}") | |
| if not row[2]: | |
| print("\n❌ ПРОБЛЕМА: Telegram bot token не настроен!") | |
| if not row[3]: | |
| print("\n❌ ПРОБЛЕМА: Webhook URL не установлен!") | |
| else: | |
| print("❌ Tenant не найден!") | |