mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 16:55:50 +01:00
fix "clone note after"
This commit is contained in:
@@ -3,16 +3,14 @@
|
|||||||
const cloningService = require('../../services/cloning');
|
const cloningService = require('../../services/cloning');
|
||||||
|
|
||||||
async function cloneNoteToParent(req) {
|
async function cloneNoteToParent(req) {
|
||||||
const noteId = req.params.noteId;
|
const {noteId, parentNoteId} = req.params;
|
||||||
const parentNoteId = req.params.parentNoteId;
|
const {prefix} = req.body;
|
||||||
const prefix = req.body.prefix;
|
|
||||||
|
|
||||||
return await cloningService.cloneNoteToParent(noteId, parentNoteId, prefix);
|
return await cloningService.cloneNoteToParent(noteId, parentNoteId, prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function cloneNoteAfter(req) {
|
async function cloneNoteAfter(req) {
|
||||||
const noteId = req.params.noteId;
|
const {noteId, afterBranchId} = req.params;
|
||||||
const afterBranchId = req.params.afterBranchId;
|
|
||||||
|
|
||||||
return await cloningService.cloneNoteAfter(noteId, afterBranchId);
|
return await cloningService.cloneNoteAfter(noteId, afterBranchId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ async function cloneNoteAfter(noteId, afterBranchId) {
|
|||||||
|
|
||||||
const validationResult = await treeService.validateParentChild(afterNote.parentNoteId, noteId);
|
const validationResult = await treeService.validateParentChild(afterNote.parentNoteId, noteId);
|
||||||
|
|
||||||
if (!validationResult.result) {
|
if (!validationResult.success) {
|
||||||
return validationResult;
|
return validationResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user