mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	added new APIs to access note detail, #2806
This commit is contained in:
		| @@ -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.`); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user