From 3abdfbd7ff87594dc652ee4d4ca657b37bcf2d6e Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 18 Sep 2026 14:49:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(secrets):=20get=E7=AB=AF=E7=82=B9=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=94=B9{total,rows}=E5=88=86=E9=A1=B5=E5=A5=91?= =?UTF-8?q?=E7=BA=A6(=E8=A3=B8list=20Tabular=E4=B8=8D=E6=B8=B2=E6=9F=93,?= =?UTF-8?q?=E5=AE=9E=E6=B5=8Bfetch=E6=9C=89=E6=95=B0=E6=8D=AE=E4=BD=86?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E7=A9=BA)=E2=80=94=E2=80=94=E5=AF=B9?= =?UTF-8?q?=E9=BD=90sqlPaging=E5=90=8C=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/secrets/get_secret_audit.dspy | 3 ++- wwwroot/secrets/get_user_secrets.dspy | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wwwroot/secrets/get_secret_audit.dspy b/wwwroot/secrets/get_secret_audit.dspy index f4497ae..6ea0746 100644 --- a/wwwroot/secrets/get_secret_audit.dspy +++ b/wwwroot/secrets/get_secret_audit.dspy @@ -20,4 +20,5 @@ for r in (rows or []): "who": str(d.get("who", "")), "created_at": str(d.get("exe_timestamp", ""))[:19], }) -return out +# Tabular 数据契约 = {total, rows}(同 get_user_secrets 实测教训) +return {"total": len(out), "rows": out} diff --git a/wwwroot/secrets/get_user_secrets.dspy b/wwwroot/secrets/get_user_secrets.dspy index 26c63ac..a8393f0 100644 --- a/wwwroot/secrets/get_user_secrets.dspy +++ b/wwwroot/secrets/get_user_secrets.dspy @@ -26,4 +26,5 @@ for r in (rows or []): "created_at": str(r.get("created_at", "") or "")[:19], "updated_at": str(r.get("updated_at", "") or "")[:19], }) -return out +# Tabular 数据契约 = sqlPaging 同构 {total, rows}(裸 list 不渲染,实测) +return {"total": len(out), "rows": out}