mirror of
https://github.com/zadam/trilium.git
synced 2024-12-26 01:01:26 +08:00
making sure that recent notes don't try to display deleted notes
This commit is contained in:
parent
3edbb65b0f
commit
f5e87db988
1 changed files with 11 additions and 1 deletions
|
@ -34,7 +34,17 @@ router.put('/:noteTreeId/:notePath', auth.checkApiAuth, async (req, res, next) =
|
||||||
});
|
});
|
||||||
|
|
||||||
async function getRecentNotes() {
|
async function getRecentNotes() {
|
||||||
return await sql.getResults("SELECT * FROM recent_notes WHERE is_deleted = 0 ORDER BY date_accessed DESC");
|
return await sql.getResults(`
|
||||||
|
SELECT
|
||||||
|
recent_notes.*
|
||||||
|
FROM
|
||||||
|
recent_notes
|
||||||
|
JOIN notes_tree USING(note_tree_id)
|
||||||
|
WHERE
|
||||||
|
recent_notes.is_deleted = 0
|
||||||
|
AND notes_tree.is_deleted = 0
|
||||||
|
ORDER BY
|
||||||
|
date_accessed DESC`);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
Loading…
Reference in a new issue