subtree duplication with becca

This commit is contained in:
zadam
2021-04-25 22:02:32 +02:00
parent a5ee590544
commit 93cae44ba0
6 changed files with 50 additions and 16 deletions

View File

@@ -9,6 +9,7 @@ const log = require('../../services/log');
const TaskContext = require('../../services/task_context');
const fs = require('fs');
const noteRevisionService = require("../../services/note_revisions.js");
const becca = require("../../services/becca/becca.js");
function getNote(req) {
const noteId = req.params.noteId;
@@ -107,7 +108,7 @@ function sortChildNotes(req) {
function protectNote(req) {
const noteId = req.params.noteId;
const note = repository.getNote(noteId);
const note = becca.notes[noteId];
const protect = !!parseInt(req.params.isProtected);
const includingSubTree = !!parseInt(req.query.subtree);