+6
-1
@@ -10,11 +10,16 @@ from app.routers import admin, auth, public, xui
|
||||
|
||||
|
||||
def create_app() -> FastAPI:
|
||||
app = FastAPI(title=settings.app_name, docs_url="/api/docs" if settings.debug else None)
|
||||
app = FastAPI(
|
||||
title=settings.app_name,
|
||||
version=settings.app_version,
|
||||
docs_url="/api/docs" if settings.debug else None,
|
||||
)
|
||||
install_session_middleware(app)
|
||||
|
||||
base = Path(__file__).resolve().parent
|
||||
templates = Jinja2Templates(directory=str(base / "templates"))
|
||||
templates.env.globals["app_version"] = settings.app_version
|
||||
app.state.templates = templates
|
||||
app.state.settings = settings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user