mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Api: Fixes #2018: Fixed error handling when getting resources of a note that does not exist
This commit is contained in:
parent
30969f8ab6
commit
7153c06e88
@ -369,6 +369,7 @@ class Api {
|
||||
return Tag.tagsByNoteId(id);
|
||||
} else if (link && link === 'resources') {
|
||||
const note = await Note.load(id);
|
||||
if (!note) throw new ErrorNotFound();
|
||||
const resourceIds = await Note.linkedResourceIds(note.body);
|
||||
const output = [];
|
||||
const loadOptions = this.defaultLoadOptions_(request);
|
||||
|
Loading…
Reference in New Issue
Block a user