Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: add types for all entities

thecodrr49bc485bc5f1
diff --git a/packages/core/api/database.js b/packages/core/api/database.js
index 038940fcb..b36de53f3 100644
--- a/packages/core/api/database.js
+++ b/packages/core/api/database.js
@@ -43,6 +43,7 @@ class Database {
.slice(0, 3)
.join(" ");
this.notes[timestamp] = {
+ type: "note",
title,
content: note.content,
pinned: note.pinned || false,
@@ -113,6 +114,7 @@ class Database {
}
}
this.notebooks[id] = {
+ type: "notebook",
title: notebook.title,
description: notebook.description,
dateCreated: id,
@@ -286,6 +288,7 @@ function getItem(id, key) {
function makeTopic(topic) {
return {
+ type: "topic",
title: topic,
dateCreated: Date.now(),
totalNotes: 0,