This commit is contained in:
zadam
2023-05-05 23:41:11 +02:00
parent 6dfc72c065
commit fa3cbb4645
54 changed files with 124 additions and 128 deletions

View File

@@ -13,7 +13,7 @@ const ValidationError = require("../../errors/validation_error");
const NotFoundError = require("../../errors/not_found_error");
/**
* Code in this file deals with moving and cloning branches. Relationship between note and parent note is unique
* Code in this file deals with moving and cloning branches. The relationship between note and parent note is unique
* for not deleted branches. There may be multiple deleted note-parent note relationships.
*/
@@ -80,7 +80,7 @@ function moveBranchBeforeNote(req) {
treeService.sortNotesIfNeeded(parentNote.noteId);
// if sorting is not needed then still the ordering might have changed above manually
// if sorting is not needed, then still the ordering might have changed above manually
entityChangesService.addNoteReorderingEntityChange(parentNote.noteId);
log.info(`Moved note ${branchToMove.noteId}, branch ${branchId} before note ${beforeBranch.noteId}, branch ${beforeBranchId}`);
@@ -131,7 +131,7 @@ function moveBranchAfterNote(req) {
treeService.sortNotesIfNeeded(parentNote.noteId);
// if sorting is not needed then still the ordering might have changed above manually
// if sorting is not needed, then still the ordering might have changed above manually
entityChangesService.addNoteReorderingEntityChange(parentNote.noteId);
log.info(`Moved note ${branchToMove.noteId}, branch ${branchId} after note ${afterNote.noteId}, branch ${afterBranchId}`);

View File

@@ -106,7 +106,7 @@ const downloadAttachment = (req, res) => downloadAttachmentInt(req.params.attach
const openAttachment = (req, res) => downloadAttachmentInt(req.params.attachmentId, res, false);
function fileContentProvider(req) {
// Read file name from route params.
// Read the file name from route params.
const note = becca.getNote(req.params.noteId);
if (!note) {
throw new NotFoundError(`Note '${req.params.noteId}' doesn't exist.`);
@@ -116,7 +116,7 @@ function fileContentProvider(req) {
}
function attachmentContentProvider(req) {
// Read file name from route params.
// Read the file name from route params.
const attachment = becca.getAttachment(req.params.attachmentId);
if (!attachment) {
throw new NotFoundError(`Attachment '${req.params.attachmentId}' doesn't exist.`);

View File

@@ -72,7 +72,7 @@ async function importToBranch(req) {
}
if (last === "true") {
// small timeout to avoid race condition (message is received before the transaction is committed)
// small timeout to avoid race condition (the message is received before the transaction is committed)
setTimeout(() => taskContext.taskSucceeded({
parentNoteId: parentNoteId,
importedNoteId: note.noteId