This commit is contained in:
2026-02-18 13:38:18 +05:00
commit 11780384e0
19 changed files with 813 additions and 0 deletions

17
api/route/default.py Normal file
View File

@@ -0,0 +1,17 @@
from fastapi import APIRouter
import toml
from pathlib import Path
router = APIRouter()
@router.get("/")
async def root():
version = "dev"
pyproject_path = Path(__file__).parent.parent.parent / "pyproject.toml"
if pyproject_path.exists():
try:
data = toml.load(pyproject_path)
version = data.get("project", {}).get("version", "dev")
except Exception:
pass
return {"status": "ok", "msg": "VPN Bot API", "version": version}