attachment ETAPI support WIP

This commit is contained in:
zadam
2023-06-05 09:23:42 +02:00
parent 49241ab318
commit 3b3f6082a7
19 changed files with 229 additions and 83 deletions

View File

@@ -149,7 +149,7 @@ function getEditedNotesOnDate(req) {
}
return notes.map(note => {
const notePath = note.isDeleted ? null : getNotePathData(note);
const notePath = getNotePathData(note);
const notePojo = note.getPojo();
notePojo.notePath = notePath ? notePath.notePath : null;

View File

@@ -11,8 +11,8 @@ const ValidationError = require("../../errors/validation_error");
function searchFromNote(req) {
const note = becca.getNoteOrThrow(req.params.noteId);
if (note.isDeleted) {
// this can be triggered from recent changes, and it's harmless to return empty list rather than fail
if (!note) {
// this can be triggered from recent changes, and it's harmless to return an empty list rather than fail
return [];
}
@@ -26,8 +26,8 @@ function searchFromNote(req) {
function searchAndExecute(req) {
const note = becca.getNoteOrThrow(req.params.noteId);
if (note.isDeleted) {
// this can be triggered from recent changes, and it's harmless to return empty list rather than fail
if (!note) {
// this can be triggered from recent changes, and it's harmless to return an empty list rather than fail
return [];
}