新增 SignalScout 首页工作台
This commit is contained in:
+8
-1
@@ -4,7 +4,7 @@ from datetime import date
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
from fastapi.responses import StreamingResponse
|
||||
from fastapi.responses import HTMLResponse, StreamingResponse
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
@@ -22,10 +22,17 @@ from app.schemas.agent import (
|
||||
TopicCreate,
|
||||
TopicRead,
|
||||
)
|
||||
from app.ui.home import HOME_PAGE_HTML
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/", response_class=HTMLResponse)
|
||||
def home() -> HTMLResponse:
|
||||
# 根路径返回业务工作台,避免用户直接打开域名时看到接口404。
|
||||
return HTMLResponse(HOME_PAGE_HTML)
|
||||
|
||||
|
||||
@router.get("/health")
|
||||
def health(settings: Settings = Depends(get_settings)) -> dict:
|
||||
# 健康检查只返回服务身份,避免暴露密钥和内部地址。
|
||||
|
||||
Reference in New Issue
Block a user