mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
initial implementation of tree prefix
This commit is contained in:
@@ -48,4 +48,17 @@ router.put('/:noteId/protectSubTree/:isProtected', auth.checkApiAuth, async (req
|
||||
res.send({});
|
||||
});
|
||||
|
||||
router.put('/:noteTreeId/setPrefix', auth.checkApiAuth, async (req, res, next) => {
|
||||
const noteTreeId = req.params.noteTreeId;
|
||||
const prefix = req.body.prefix;
|
||||
|
||||
await sql.doInTransaction(async () => {
|
||||
await sql.execute("UPDATE notes_tree SET prefix = ? WHERE note_tree_id = ?", [prefix, noteTreeId]);
|
||||
|
||||
await sync_table.addNoteTreeSync(noteTreeId);
|
||||
});
|
||||
|
||||
res.send({});
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user