mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 08:15:52 +01:00
initial implementation of note attachments
This commit is contained in:
@@ -106,7 +106,7 @@ class BNoteRevision extends AbstractBeccaEntity {
|
||||
}
|
||||
}
|
||||
|
||||
setContent(content, ignoreMissingProtectedSession = false) {
|
||||
setContent(content) {
|
||||
const pojo = {
|
||||
noteRevisionId: this.noteRevisionId,
|
||||
content: content,
|
||||
@@ -117,7 +117,7 @@ class BNoteRevision extends AbstractBeccaEntity {
|
||||
if (protectedSessionService.isProtectedSessionAvailable()) {
|
||||
pojo.content = protectedSessionService.encrypt(pojo.content);
|
||||
}
|
||||
else if (!ignoreMissingProtectedSession) {
|
||||
else {
|
||||
throw new Error(`Cannot update content of noteRevisionId=${this.noteRevisionId} since we're out of protected session.`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user