diff --git a/docs/backend_api/BNote.html b/docs/backend_api/BNote.html index b4173c71f..fe51bc8b1 100644 --- a/docs/backend_api/BNote.html +++ b/docs/backend_api/BNote.html @@ -1588,7 +1588,7 @@ See addLabel, addRelation for more specific methods.
Source:
@@ -1835,7 +1835,7 @@ See addLabel, addRelation for more specific methods.
Source:
@@ -2081,7 +2081,7 @@ returned.
Source:
@@ -2316,7 +2316,7 @@ returned.
Source:
@@ -2432,7 +2432,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -2653,7 +2653,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -2919,7 +2919,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -3025,7 +3025,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -3127,7 +3127,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -3229,7 +3229,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -3334,7 +3334,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -3436,7 +3436,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -3610,7 +3610,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -3789,7 +3789,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -3997,7 +3997,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -4176,7 +4176,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -4355,7 +4355,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -4826,108 +4826,6 @@ In the future, this functionality might get more generic and some of the require -

getContentMetadata() → {Object}

- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - -

getDescendantNoteIds()

@@ -4978,7 +4876,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -5068,7 +4966,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -5174,7 +5072,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -5281,7 +5179,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -5432,7 +5330,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -5590,7 +5488,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -5760,7 +5658,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -5927,7 +5825,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -6033,7 +5931,7 @@ In the future, this functionality might get more generic and some of the require
Source:
@@ -6213,7 +6111,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -6483,7 +6381,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -6638,7 +6536,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -6796,7 +6694,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -6966,7 +6864,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -7133,7 +7031,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -7288,7 +7186,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -7446,7 +7344,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -7616,7 +7514,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -8064,7 +7962,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -8222,7 +8120,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -8392,7 +8290,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -8498,7 +8396,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -8600,7 +8498,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -8709,7 +8607,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -8880,7 +8778,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -9088,7 +8986,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -9190,7 +9088,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -9296,7 +9194,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -9398,7 +9296,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -9589,7 +9487,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -9815,7 +9713,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -10111,7 +10009,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -10340,7 +10238,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -10538,7 +10436,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -10736,7 +10634,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -10934,7 +10832,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -11040,7 +10938,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -11190,7 +11088,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -11296,7 +11194,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -11390,7 +11288,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -11496,7 +11394,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -11602,7 +11500,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -11708,7 +11606,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -11863,7 +11761,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -11969,7 +11867,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -12077,7 +11975,7 @@ This method can be significantly faster than the getAttribute()
Source:
@@ -12536,7 +12434,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -12716,7 +12614,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -12896,7 +12794,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -13091,7 +12989,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -13193,7 +13091,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -13425,7 +13323,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -13704,7 +13602,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -13884,7 +13782,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -14044,7 +13942,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -14286,7 +14184,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -14497,7 +14395,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
@@ -14708,7 +14606,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
Source:
diff --git a/docs/backend_api/becca_entities_bnote.js.html b/docs/backend_api/becca_entities_bnote.js.html index f15484d33..f69de3c68 100644 --- a/docs/backend_api/becca_entities_bnote.js.html +++ b/docs/backend_api/becca_entities_bnote.js.html @@ -257,11 +257,6 @@ class BNote extends AbstractBeccaEntity { return this._getContent(); } - /** @returns {{dateModified, utcDateModified}} */ - getContentMetadata() { - return sql.getRow(`SELECT dateModified, utcDateModified FROM blobs WHERE blobId = ?`, [this.blobId]); - } - /** @returns {*} */ getJsonContent() { const content = this.getContent(); @@ -1617,7 +1612,6 @@ class BNote extends AbstractBeccaEntity { saveRevision() { return sql.transactional(() => { let noteContent = this.getContent(); - const contentMetadata = this.getContentMetadata(); const revision = new BRevision({ noteId: this.noteId, @@ -1626,14 +1620,10 @@ class BNote extends AbstractBeccaEntity { type: this.type, mime: this.mime, isProtected: this.isProtected, - utcDateLastEdited: this.utcDateModified > contentMetadata.utcDateModified - ? this.utcDateModified - : contentMetadata.utcDateModified, + utcDateLastEdited: this.utcDateModified, utcDateCreated: dateUtils.utcNowDateTime(), utcDateModified: dateUtils.utcNowDateTime(), - dateLastEdited: this.dateModified > contentMetadata.dateModified - ? this.dateModified - : contentMetadata.dateModified, + dateLastEdited: this.dateModified, dateCreated: dateUtils.localNowDateTime() }, true); diff --git a/docs/frontend_api/FNote.html b/docs/frontend_api/FNote.html index 92b8be652..7d1352ff0 100644 --- a/docs/frontend_api/FNote.html +++ b/docs/frontend_api/FNote.html @@ -3441,6 +3441,112 @@ +

(async) getMetadata() → {Promise.<{dateCreated: string, utcDateCreated: string, dateModified: string, utcDateModified: string}>}

+ + + + + + +
+ Provides note's date metadata. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<{dateCreated: string, utcDateCreated: string, dateModified: string, utcDateModified: string}> + + +
+
+ + + + + + + + + + + + +

(async) getNoteComplement() → {Promise.<FBlob>}

diff --git a/docs/frontend_api/entities_fnote.js.html b/docs/frontend_api/entities_fnote.js.html index b16681b74..77158873e 100644 --- a/docs/frontend_api/entities_fnote.js.html +++ b/docs/frontend_api/entities_fnote.js.html @@ -1017,6 +1017,15 @@ class FNote { isOptions() { return this.noteId.startsWith("_options"); } + + /** + * Provides note's date metadata. + * + * @returns {Promise<{dateCreated: string, utcDateCreated: string, dateModified: string, utcDateModified: string}>} + */ + async getMetadata() { + return await server.get(`notes/${this.noteId}/metadata`); + } } export default FNote; diff --git a/src/public/app/entities/fnote.js b/src/public/app/entities/fnote.js index 96e6e98a7..e770e0b69 100644 --- a/src/public/app/entities/fnote.js +++ b/src/public/app/entities/fnote.js @@ -990,6 +990,11 @@ class FNote { return this.noteId.startsWith("_options"); } + /** + * Provides note's date metadata. + * + * @returns {Promise<{dateCreated: string, utcDateCreated: string, dateModified: string, utcDateModified: string}>} + */ async getMetadata() { return await server.get(`notes/${this.noteId}/metadata`); }