From 0962df411262e480103a9ccf1afc808d2789404f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=87=E8=96=87=E5=AE=89?= Date: Tue, 3 Feb 2026 11:41:51 +0800 Subject: [PATCH] a --- backend/api/routes/accounts.py | 3 ++- backend/api/routes/config.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/api/routes/accounts.py b/backend/api/routes/accounts.py index 11a1cb7..7a4ccc4 100644 --- a/backend/api/routes/accounts.py +++ b/backend/api/routes/accounts.py @@ -153,7 +153,8 @@ async def update_credentials( # --- Service Management --- -@router.get("/{account_id}/service/status") +@router.get("/{account_id}/trading/status") +@router.get("/{account_id}/service/status", include_in_schema=False) # 兼容旧路由 async def get_service_status(account_id: int, user: Dict[str, Any] = Depends(require_account_access)): """获取该账号关联的交易服务状态""" try: diff --git a/backend/api/routes/config.py b/backend/api/routes/config.py index e3e5cf3..2fa39ad 100644 --- a/backend/api/routes/config.py +++ b/backend/api/routes/config.py @@ -1,12 +1,12 @@ """ 配置管理API """ -from fastapi import APIRouter, HTTPException, Header, Depends +from fastapi import APIRouter, HTTPException, Header, Depends, Query from api.models.config import ConfigItem, ConfigUpdate import sys from pathlib import Path import logging -from typing import Dict, Any +from typing import Dict, Any, Optional # 添加项目根目录到路径 project_root = Path(__file__).parent.parent.parent.parent