added new APIs to access note detail, #2806

This commit is contained in:
zadam
2022-05-03 23:25:28 +02:00
parent 5dab189815
commit 93cc6b12ec
9 changed files with 513 additions and 29 deletions

View File

@@ -266,7 +266,7 @@ class Note extends AbstractEntity {
setContent(content, ignoreMissingProtectedSession = false) {
if (content === null || content === undefined) {
throw new Error(`Cannot set null content to note ${this.noteId}`);
throw new Error(`Cannot set null content to note '${this.noteId}'`);
}
if (this.isStringNote()) {
@@ -288,7 +288,7 @@ class Note extends AbstractEntity {
pojo.content = protectedSessionService.encrypt(pojo.content);
}
else if (!ignoreMissingProtectedSession) {
throw new Error(`Cannot update content of noteId=${this.noteId} since we're out of protected session.`);
throw new Error(`Cannot update content of noteId '${this.noteId}' since we're out of protected session.`);
}
}