superxu520 commited on
Commit
9de587b
·
1 Parent(s): b759462

fix: 修复 /auth/config.js 端点缺少 g_config 导入的问题

Browse files
Files changed (1) hide show
  1. app/main.py +1 -0
app/main.py CHANGED
@@ -121,6 +121,7 @@ def create_app() -> FastAPI:
121
  @app.get("/auth/config.js", tags=["Auth"])
122
  async def get_frontend_config():
123
  """Provide API key to built-in frontend."""
 
124
  config_js = f"""
125
  window.GEMINI_CONFIG = {{
126
  API_KEY: "{g_config.server.api_key or ''}"
 
121
  @app.get("/auth/config.js", tags=["Auth"])
122
  async def get_frontend_config():
123
  """Provide API key to built-in frontend."""
124
+ from app.utils import g_config
125
  config_js = f"""
126
  window.GEMINI_CONFIG = {{
127
  API_KEY: "{g_config.server.api_key or ''}"