refactoring of note saving code & API

This commit is contained in:
azivner
2018-04-08 08:21:49 -04:00
parent 6128bb4ff3
commit d2e2caed62
3 changed files with 31 additions and 38 deletions

View File

@@ -44,6 +44,14 @@ class NoteShort {
get toString() {
return `Note(noteId=${this.noteId}, title=${this.title})`;
}
get dto() {
const dto = Object.assign({}, this);
delete dto.treeCache;
delete dto.hideInAutocomplete;
return dto;
}
}
export default NoteShort;