From 4cba55f4729643dde44d9d69f9b2350db1ecc9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=86=9C=E9=98=BF=E6=A5=A0?= Date: Tue, 8 Sep 2026 15:27:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=87=E7=AD=BE=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=9F=A5=E8=AF=A2=EF=BC=9Ajson=5Feach=20=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E5=88=AB=E5=90=8D=20n.tags=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20/api/notes=3Ftag=3D=20500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/store/notes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/store/notes.go b/internal/store/notes.go index 8f11f75..bb0d245 100644 --- a/internal/store/notes.go +++ b/internal/store/notes.go @@ -157,7 +157,7 @@ func (s *Store) ListPublicNotes(page, pageSize int, tag string) ([]Note, int, er args := []any{} if tag != "" { // json_each 参数化过滤,无拼接注入面。 - where += ` AND EXISTS (SELECT 1 FROM json_each(notes.tags) je WHERE je.value = ?)` + where += ` AND EXISTS (SELECT 1 FROM json_each(n.tags) je WHERE je.value = ?)` args = append(args, tag) } var total int