Skip to content

Commit fd26370

Browse files
committed
路径
1 parent 7069268 commit fd26370

3 files changed

Lines changed: 3 additions & 22 deletions

File tree

front/control_panel.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>Google OAuth 认证管理</title>
6+
<title>GCLI2API 控制面板</title>
77
<style>
88
body {
99
font-family: Arial, sans-serif;

src/web_routes.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
load_credentials_from_env, clear_env_credentials
2020
)
2121
from .credential_manager import CredentialManager
22-
from config import (
23-
get_config_value
24-
)
22+
import config
2523

2624
# 创建路由器
2725
router = APIRouter()
@@ -101,6 +99,7 @@ def verify_token(credentials: HTTPAuthorizationCredentials = Depends(security)):
10199
raise HTTPException(status_code=401, detail="无效的认证令牌")
102100
return credentials.credentials
103101

102+
@router.get("/", response_class=HTMLResponse)
104103
@router.get("/auth", response_class=HTMLResponse)
105104
async def serve_control_panel():
106105
"""提供统一控制面板(包含认证、文件管理、配置等功能)"""

web.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,6 @@ async def lifespan(app: FastAPI):
9393
tags=["Web Interface"]
9494
)
9595

96-
@app.get("/")
97-
async def root():
98-
"""根路径 - 服务状态信息"""
99-
return {
100-
"service": "GCLI2API",
101-
"status": "running",
102-
"endpoints": {
103-
"openai_api": "/v1/chat/completions",
104-
"openai_models": "/v1/models",
105-
"gemini_api": "/v1/models/{model}:generateContent",
106-
"gemini_streaming": "/v1/models/{model}:streamGenerateContent",
107-
"gemini_models": "/v1/models",
108-
"control_panel": "/auth",
109-
},
110-
"docs": "/docs",
111-
"credential_manager": "initialized" if global_credential_manager else "failed"
112-
}
113-
11496
def get_credential_manager():
11597
"""获取全局凭证管理器实例"""
11698
return global_credential_manager

0 commit comments

Comments
 (0)