mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 02:30:42 +01:00
grammar
This commit is contained in:
@@ -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}`);
|
||||
|
||||
@@ -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.`);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user