Skip to content

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

fix: do not save lastSynced key under notesnook key

thecodrrf2efacd7b083
diff --git a/packages/core/api/sync/__tests__/utils.js b/packages/core/api/sync/__tests__/utils.js
index b9531ee37..74f9c005d 100644
--- a/packages/core/api/sync/__tests__/utils.js
+++ b/packages/core/api/sync/__tests__/utils.js
@@ -7,9 +7,7 @@ const SUCCESS_LOGIN_RESPONSE = {
payload: {
username: "thecodrr",
email: process.env.EMAIL,
- notesnook: {
- lastSynced: 0,
- },
+ lastSynced: 0,
},
scopes: "sync",
expiry: 36000,
diff --git a/packages/core/api/sync/index.js b/packages/core/api/sync/index.js
index 8fce2d70c..21e156769 100644
--- a/packages/core/api/sync/index.js
+++ b/packages/core/api/sync/index.js
@@ -85,7 +85,7 @@ export default class Sync {
// update our lastSynced time
if (lastSynced) {
- await this._db.user.set({ notesnook: { ...user.notesnook, lastSynced } });
+ await this._db.user.set({ lastSynced });
}
}
@@ -103,7 +103,7 @@ export default class Sync {
// update our lastSynced time
if (lastSynced) {
- await this._db.user.set({ notesnook: { ...user.notesnook, lastSynced } });
+ await this._db.user.set({ lastSynced });
}
}