A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
feat: support only single notebook in note
thecodrra027ed593376
diff --git a/packages/core/api/database.js b/packages/core/api/database.jsindex 2751d44b8..ea50f86bc 100644--- a/packages/core/api/database.js+++ b/packages/core/api/database.js@@ -71,7 +71,7 @@ class Database {content: note.content,pinned: note.pinned || false,tags: note.tags || [],- notebooks: note.notebooks || {},+ notebook: note.notebook || {},colors: note.colors || [],favorite: note.favorite || false,headline:@@ -215,8 +215,11 @@ class Database {//increment totalNotes countnotebook.topics[topicIndex].totalNotes++;notebook.totalNotes++;- //add notebookId to the note- this.notes[noteId].notebooks[notebookId] = notebook.title;+ //add notebook to the note+ this.notes[noteId].notebook = {+ notebook: notebookId,+ topic: notebook.topics[topicIndex].title+ };return true;});@@ -239,7 +242,7 @@ class Database {if (index <= -1) return false;notebook.topics[topicIndex].notes.splice(index, 1);//delete notebook from note- delete this.notes[noteId].notebooks[notebookId];+ this.notes[noteId].notebook = {};//decrement totalNotes countnotebook.topics[topicIndex].totalNotes--;notebook.totalNotes--;