export single note as markdown, #166

This commit is contained in:
azivner
2018-09-03 09:40:22 +02:00
parent 467ad79129
commit 9bdd4437f2
9 changed files with 61 additions and 27 deletions

View File

@@ -482,6 +482,13 @@ class Note extends Entity {
return await repository.getEntities("SELECT * FROM branches WHERE isDeleted = 0 AND noteId = ?", [this.noteId]);
}
/**
* @returns {boolean} - true if note has children
*/
async hasChildren() {
return (await this.getChildNotes()).length > 0;
}
/**
* @returns {Promise<Note[]>} child notes of this note
*/