fix(server): edited notes listing automatically generated hidden notes (closes #5683)

This commit is contained in:
Elian Doran
2025-10-23 16:42:27 +03:00
parent 5d0669b464
commit e94b5ac07a

View File

@@ -152,14 +152,14 @@ function restoreRevision(req: Request) {
}
function getEditedNotesOnDate(req: Request) {
const noteIds = sql.getColumn<string>(
`
const noteIds = sql.getColumn<string>(/*sql*/`\
SELECT notes.*
FROM notes
WHERE noteId IN (
SELECT noteId FROM notes
WHERE notes.dateCreated LIKE :date
OR notes.dateModified LIKE :date
WHERE
(notes.dateCreated LIKE :date OR notes.dateModified LIKE :date)
AND (noteId NOT LIKE '_%')
UNION ALL
SELECT noteId FROM revisions
WHERE revisions.dateLastEdited LIKE :date