Release 1.0.0 with server info console
This commit is contained in:
6
main.py
6
main.py
@@ -6,11 +6,12 @@ from fastapi import FastAPI, Depends
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
|
||||
from app.core.database import init_db, async_session
|
||||
from app.core.server_info import get_app_version
|
||||
from app.core.scheduler import start_scheduler
|
||||
from app.core.state import state_manager, discovery_service
|
||||
from sqlalchemy import select
|
||||
from app.models.device import GroupModel
|
||||
from app.api.routes import devices, control, schedules, api_keys, stats
|
||||
from app.api.routes import devices, control, schedules, api_keys, stats, system
|
||||
from app.api.deps import verify_token
|
||||
|
||||
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO").upper()
|
||||
@@ -61,7 +62,7 @@ async def lifespan(app: FastAPI):
|
||||
logger.info("🛑 Ignis Core остановлен")
|
||||
|
||||
|
||||
app = FastAPI(title="Ignis Core API", lifespan=lifespan)
|
||||
app = FastAPI(title="Ignis Core API", version=get_app_version(), lifespan=lifespan)
|
||||
|
||||
|
||||
@app.middleware("http")
|
||||
@@ -87,6 +88,7 @@ app.include_router(control.router, prefix="/control", tags=["Control"])
|
||||
app.include_router(schedules.router, prefix="/schedules", tags=["Schedules"])
|
||||
app.include_router(api_keys.router, prefix="/api-keys", tags=["API Keys"])
|
||||
app.include_router(stats.router, prefix="/stats", tags=["Stats"])
|
||||
app.include_router(system.router, prefix="/system", tags=["System"])
|
||||
|
||||
# Статика
|
||||
# Мы убираем html=True из корня, чтобы 404-е ошибки API не превращались в загрузку index.html
|
||||
|
||||
Reference in New Issue
Block a user