MCPcopy Create free account
hub / github.com/ZyphrZero/z.ai2api_python / get_env_preview

Function get_env_preview

app/admin/api.py:519–527  ·  view source on GitHub ↗

获取 .env 文件预览

()

Source from the content-addressed store, hash-verified

517
518@router.get("/env-preview", dependencies=[Depends(require_auth)])
519async def get_env_preview():
520 """获取 .env 文件预览"""
521 try:
522 content = read_env_content()
523 if not content:
524 content = "# .env 文件不存在"
525 return HTMLResponse(f"<pre>{escape(content)}</pre>")
526 except Exception as exc:
527 return HTMLResponse(f"<pre># 读取失败: {escape(str(exc))}</pre>")
528
529
530@router.get("/live-logs", response_class=HTMLResponse)

Callers

nothing calls this directly

Calls 1

read_env_contentFunction · 0.90

Tested by

no test coverage detected