allow cloning into notes, not just branches, fixes #2484

This commit is contained in:
zadam
2021-12-27 23:39:46 +01:00
parent 3128a7d62f
commit d97e454463
9 changed files with 55 additions and 24 deletions

View File

@@ -2,11 +2,18 @@
const cloningService = require('../../services/cloning');
function cloneNoteToParent(req) {
function cloneNoteToBranch(req) {
const {noteId, parentBranchId} = req.params;
const {prefix} = req.body;
return cloningService.cloneNoteToParent(noteId, parentBranchId, prefix);
return cloningService.cloneNoteToBranch(noteId, parentBranchId, prefix);
}
function cloneNoteToNote(req) {
const {noteId, parentNoteId} = req.params;
const {prefix} = req.body;
return cloningService.cloneNoteToNote(noteId, parentNoteId, prefix);
}
function cloneNoteAfter(req) {
@@ -16,6 +23,7 @@ function cloneNoteAfter(req) {
}
module.exports = {
cloneNoteToParent,
cloneNoteToBranch,
cloneNoteToNote,
cloneNoteAfter
};