新增 SignalScout 首页工作台

This commit is contained in:
Codex
2026-07-08 22:22:33 +08:00
parent 067a82e29d
commit 05d98dd576
4 changed files with 549 additions and 1 deletions
+8 -1
View File
@@ -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:
# 健康检查只返回服务身份,避免暴露密钥和内部地址。