From aff7373bbdba5e8cca8ba5ae009c41de08085577 Mon Sep 17 00:00:00 2001 From: Seayon <153660639@qq.com> Date: Sun, 17 Aug 2025 13:31:24 +0800 Subject: [PATCH] refactor: standardize backend URL environment variable name Replace PYTHON_BACKEND_HOST with SERVER_BASE_URL for consistency - Update src/app/api/wiki/projects/route.ts to use SERVER_BASE_URL - Ensures consistent naming across the entire codebase - Aligns with documented environment variables in README.md --- src/app/api/wiki/projects/route.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/api/wiki/projects/route.ts b/src/app/api/wiki/projects/route.ts index f87ed35d9..864bcd915 100644 --- a/src/app/api/wiki/projects/route.ts +++ b/src/app/api/wiki/projects/route.ts @@ -31,9 +31,9 @@ function isDeleteProjectCachePayload(obj: unknown): obj is DeleteProjectCachePay } // Ensure this matches your Python backend configuration -const PYTHON_BACKEND_URL = process.env.PYTHON_BACKEND_HOST || 'http://localhost:8001'; -const PROJECTS_API_ENDPOINT = `${PYTHON_BACKEND_URL}/api/processed_projects`; -const CACHE_API_ENDPOINT = `${PYTHON_BACKEND_URL}/api/wiki_cache`; +const TARGET_SERVER_BASE_URL = process.env.SERVER_BASE_URL || 'http://localhost:8001'; +const PROJECTS_API_ENDPOINT = `${TARGET_SERVER_BASE_URL}/api/processed_projects`; +const CACHE_API_ENDPOINT = `${TARGET_SERVER_BASE_URL}/api/wiki_cache`; export async function GET() { try {