mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
note expansion is not synced anymore so there's less possibility of conflict
This commit is contained in:
@@ -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({});
|
||||||
|
|||||||
Reference in New Issue
Block a user