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