From 863ec5ea52b4e314ef98030610e693cd9adaed11 Mon Sep 17 00:00:00 2001 From: xfy Date: Tue, 16 Jun 2026 11:34:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(posts):=20get=5Fpost=5Fby=5Fslug=20?= =?UTF-8?q?=E7=9A=84=20SELECT=20=E8=A1=A5=E4=B8=8A=20toc=5Fhtml=20?= =?UTF-8?q?=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit row_to_post_full 用 row.get("toc_html") 读取该列,但 get_post_by_slug 的 SQL 漏选了 p.toc_html,导致访问公开文章详情时 panic(invalid column toc_html)。补上列即可。 --- src/api/posts/read.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/posts/read.rs b/src/api/posts/read.rs index e4f52d3..524b355 100644 --- a/src/api/posts/read.rs +++ b/src/api/posts/read.rs @@ -73,7 +73,7 @@ pub async fn get_post_by_slug(slug: String) -> Result