mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
sync WIP
This commit is contained in:
@@ -10,7 +10,21 @@ router.get('/changed/:since', auth.checkApiAuth, async (req, res, next) => {
|
||||
|
||||
res.send({
|
||||
'tree': await sql.getResults("select * from notes_tree where date_modified >= ?", [since]),
|
||||
'notes': await sql.getFlattenedResults('note_id', "select note_id from notes where date_modified >= ?", [since])
|
||||
'notes': await sql.getFlattenedResults('note_id', "select note_id from notes where date_modified >= ?", [since]),
|
||||
'audit_log': await sql.getResults("select * from audit_log where date_modified >= ?", [since])
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/note/:noteId/:since', auth.checkApiAuth, async (req, res, next) => {
|
||||
const noteId = req.params.noteId;
|
||||
const since = parseInt(req.params.since);
|
||||
|
||||
const detail = await sql.getSingleResult("select * from notes where note_id = ?", [noteId]);
|
||||
|
||||
res.send({
|
||||
'detail': detail,
|
||||
'images': await sql.getResults("select * from images where note_id = ? order by note_offset", [noteId]),
|
||||
'history': await sql.getResults("select * from notes_history where note_id = ? and date_modified_to >= ?", [noteId, since])
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user