audit of client actions/ protection of admin TG v2/ fix of cash accounting status/ update of dependencies
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
from config import PROJECT_NAME, USERNAME_BOT
|
||||
|
||||
router = APIRouter(tags=["Root"])
|
||||
|
||||
|
||||
@@ -11,3 +13,12 @@ async def root():
|
||||
@router.get("/api/version", include_in_schema=True)
|
||||
async def version():
|
||||
return {"version": 2, "api": "v2"}
|
||||
|
||||
|
||||
@router.get("/api/telegram-widget-bot", include_in_schema=True)
|
||||
async def telegram_widget_bot():
|
||||
"""Имя бота и имя проекта для веб-клиента."""
|
||||
return {
|
||||
"bot_username": USERNAME_BOT.replace("@", ""),
|
||||
"project_name": (PROJECT_NAME or "Solo").strip() if isinstance(PROJECT_NAME, str) else "Solo",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user