From e883f32f89df257b892e3c54c0156fe653cd587d Mon Sep 17 00:00:00 2001 From: contributor Date: Mon, 10 Nov 2025 20:03:59 +0200 Subject: [PATCH 1/2] edited notes: better sql like statement --- apps/server/src/routes/api/revisions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/server/src/routes/api/revisions.ts b/apps/server/src/routes/api/revisions.ts index d9b7b975e..b573bb131 100644 --- a/apps/server/src/routes/api/revisions.ts +++ b/apps/server/src/routes/api/revisions.ts @@ -159,7 +159,7 @@ function getEditedNotesOnDate(req: Request) { SELECT noteId FROM notes WHERE (notes.dateCreated LIKE :date OR notes.dateModified LIKE :date) - AND (noteId NOT LIKE '_%') + AND (notes.noteId NOT LIKE '%\\_%' ESCAPE '\\') UNION ALL SELECT noteId FROM revisions WHERE revisions.dateCreated LIKE :date From d0a994c102d7c626b60fa27c34a9c9f143dc9aa6 Mon Sep 17 00:00:00 2001 From: contributor Date: Mon, 10 Nov 2025 20:15:08 +0200 Subject: [PATCH 2/2] fix sql like pattern --- apps/server/src/routes/api/revisions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/server/src/routes/api/revisions.ts b/apps/server/src/routes/api/revisions.ts index b573bb131..9700e7f78 100644 --- a/apps/server/src/routes/api/revisions.ts +++ b/apps/server/src/routes/api/revisions.ts @@ -159,7 +159,7 @@ function getEditedNotesOnDate(req: Request) { SELECT noteId FROM notes WHERE (notes.dateCreated LIKE :date OR notes.dateModified LIKE :date) - AND (notes.noteId NOT LIKE '%\\_%' ESCAPE '\\') + AND (notes.noteId NOT LIKE '\\_%' ESCAPE '\\') UNION ALL SELECT noteId FROM revisions WHERE revisions.dateCreated LIKE :date