fix "clone note after"

This commit is contained in:
zadam 2019-10-26 21:14:06 +02:00
parent bdf42749f3
commit f82e99b5ed
2 changed files with 4 additions and 6 deletions

View File

@ -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);
}

View File

@ -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;
}