mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
note expansion is not synced anymore so there's less possibility of conflict
This commit is contained in:
parent
0f11eb9e98
commit
70f717b350
@ -84,13 +84,9 @@ router.put('/:noteId/moveAfter/:afterNoteId', async (req, res, next) => {
|
|||||||
router.put('/:noteId/expanded/:expanded', async (req, res, next) => {
|
router.put('/:noteId/expanded/:expanded', async (req, res, next) => {
|
||||||
const noteId = req.params.noteId;
|
const noteId = req.params.noteId;
|
||||||
const expanded = req.params.expanded;
|
const expanded = req.params.expanded;
|
||||||
const now = utils.nowTimestamp();
|
|
||||||
|
|
||||||
await sql.doInTransaction(async () => {
|
await sql.doInTransaction(async () => {
|
||||||
await sql.execute("update notes_tree set is_expanded = ?, date_modified = ? where note_id = ?", [expanded, now, noteId]);
|
await sql.execute("update notes_tree set is_expanded = ? where note_id = ?", [expanded, noteId]);
|
||||||
|
|
||||||
await sql.addNoteTreeSync(noteId);
|
|
||||||
await sql.addAudit(audit_category.CHANGE_EXPANDED, utils.browserId(req), noteId, null, expanded);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
res.send({});
|
res.send({});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user