fix telegram

This commit is contained in:
Claude Agent
2026-02-23 15:12:33 +00:00
parent 6c78fec8a7
commit 8bc567a9c5
426 changed files with 112478 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
"""Telegram module router factory."""
from fastapi import APIRouter
def create_telegram_router() -> APIRouter:
"""
Create and configure Telegram module router.
Includes all Telegram bot internal API endpoints:
- /auth/verify-user - Verify Telegram user authentication
- /auth/generate-code - Generate auth code for linking
- /auth/verify-code - Verify auth code
- /stats - Bot database statistics
Returns:
APIRouter: Configured router for Telegram module
"""
router = APIRouter()
# Import routers here to avoid circular imports
from .auth_codes import router as auth_codes_router
from .internal_api import internal_api as internal_api_router
# Include all sub-routers (no prefix - already prefixed in main.py with /api/telegram)
# Auth codes router provides /auth/* endpoints
router.include_router(auth_codes_router, tags=["telegram-auth"])
# Internal API router provides additional endpoints like /stats
router.include_router(internal_api_router, tags=["telegram-internal"])
return router