mirror of
https://github.com/zadam/trilium.git
synced 2024-12-27 01:34:05 +08:00
note expansion is not synced anymore so there's less possibility of conflict
This commit is contained in:
parent
0f11eb9e98
commit
70f717b350
1 changed files with 1 additions and 5 deletions
|
@ -84,13 +84,9 @@ router.put('/:noteId/moveAfter/:afterNoteId', async (req, res, next) => {
|
|||
router.put('/:noteId/expanded/:expanded', async (req, res, next) => {
|
||||
const noteId = req.params.noteId;
|
||||
const expanded = req.params.expanded;
|
||||
const now = utils.nowTimestamp();
|
||||
|
||||
await sql.doInTransaction(async () => {
|
||||
await sql.execute("update notes_tree set is_expanded = ?, date_modified = ? where note_id = ?", [expanded, now, noteId]);
|
||||
|
||||
await sql.addNoteTreeSync(noteId);
|
||||
await sql.addAudit(audit_category.CHANGE_EXPANDED, utils.browserId(req), noteId, null, expanded);
|
||||
await sql.execute("update notes_tree set is_expanded = ? where note_id = ?", [expanded, noteId]);
|
||||
});
|
||||
|
||||
res.send({});
|
||||
|
|
Loading…
Reference in a new issue