This commit is contained in:
2026-02-18 00:02:25 +05:00
parent a1ef89ff9a
commit 5e0f779a4d
17 changed files with 404 additions and 11 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}