From fdf57b6cfae3b295823bbb232e1b3073f6a2d67d Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Sat, 14 Sep 2024 16:00:18 +0800 Subject: [PATCH] revisions_number_limit --- src/routes/api/revisions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/api/revisions.ts b/src/routes/api/revisions.ts index 9e1e4ffac..f4defb64b 100644 --- a/src/routes/api/revisions.ts +++ b/src/routes/api/revisions.ts @@ -114,7 +114,7 @@ function eraseRevision(req: Request) { } function eraseAllExcessRevisions() { - let allNoteIds = sql.getRows('SELECT noteId FROM notes') as { noteId: string }[]; + let allNoteIds = sql.getRows("SELECT noteId FROM notes WHERE SUBSTRING(noteId, 1, 1) != '_'") as { noteId: string }[]; allNoteIds.forEach(row => { becca.getNote(row.noteId)?.eraseExcessRevisionSnapshots() });