mirror of
https://github.com/zadam/trilium.git
synced 2025-12-05 06:54:23 +01:00
edited notes: use parameterized limit
This commit is contained in:
parent
d3c0e8b9da
commit
f083908293
@ -31,8 +31,10 @@ function getEditedNotesOnDate(req: Request) {
|
|||||||
} satisfies EditedNotesResponse;
|
} satisfies EditedNotesResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sqlParams = { date: dateFilter.date + "%" };
|
const sqlParams = {
|
||||||
const limit = 50;
|
date: dateFilter.date + "%",
|
||||||
|
limit: 50,
|
||||||
|
};
|
||||||
const sqlQuery = /*sql*/`\
|
const sqlQuery = /*sql*/`\
|
||||||
SELECT notes.*
|
SELECT notes.*
|
||||||
FROM notes
|
FROM notes
|
||||||
@ -46,7 +48,7 @@ function getEditedNotesOnDate(req: Request) {
|
|||||||
WHERE revisions.dateCreated LIKE :date
|
WHERE revisions.dateCreated LIKE :date
|
||||||
)
|
)
|
||||||
ORDER BY isDeleted
|
ORDER BY isDeleted
|
||||||
LIMIT ${limit}`;
|
LIMIT :limit`;
|
||||||
|
|
||||||
const noteIds = sql.getColumn<string>(
|
const noteIds = sql.getColumn<string>(
|
||||||
sqlQuery,
|
sqlQuery,
|
||||||
@ -72,7 +74,7 @@ function getEditedNotesOnDate(req: Request) {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
notes: editedNotes,
|
notes: editedNotes,
|
||||||
limit: limit,
|
limit: sqlParams.limit,
|
||||||
} satisfies EditedNotesResponse;
|
} satisfies EditedNotesResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user