From 0d887d311b7101aff4495833ba0aecf6d7167aba Mon Sep 17 00:00:00 2001 From: sans Date: Sat, 18 Jul 2026 23:38:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E5=8C=96=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/routers/admin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/routers/admin.py b/backend/routers/admin.py index 1662c9c..0268c9d 100644 --- a/backend/routers/admin.py +++ b/backend/routers/admin.py @@ -592,7 +592,6 @@ async def admin_generate_script( ): """管理端生成部署脚本""" from jinja2 import Environment, FileSystemLoader - from fastapi.responses import PlainTextResponse template_dir = Path(__file__).parent.parent / "templates_cert" jinja_env = Environment(loader=FileSystemLoader(str(template_dir))) @@ -620,7 +619,7 @@ async def admin_generate_script( check_cmd=d.check_cmd, reload_cmd=d.reload_cmd, ) - return PlainTextResponse(script) + return {"script": script} # ──────────────── 证书信息 ────────────────