summaryrefslogtreecommitdiff
path: root/lib/models/note.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models/note.js')
-rw-r--r--lib/models/note.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/models/note.js b/lib/models/note.js
index 119d72c3..dc4d187b 100644
--- a/lib/models/note.js
+++ b/lib/models/note.js
@@ -209,20 +209,20 @@ module.exports = function (sequelize, DataTypes) {
return _callback(err, null)
})
},
- parseNoteIdByBase64Url: function (_callback) {
- // try to parse note id by base64url
+ // parse note id by LZString is deprecated, here for compability
+ parseNoteIdByLZString: function (_callback) {
+ // try to parse note id by LZString Base64
try {
- var id = Note.decodeNoteId(noteId)
+ var id = LZString.decompressFromBase64(noteId)
if (id && Note.checkNoteIdValid(id)) { return callback(null, id) } else { return _callback(null, null) }
} catch (err) {
return _callback(err, null)
}
},
- // parse note id by LZString is deprecated, here for compability
- parseNoteIdByLZString: function (_callback) {
- // try to parse note id by LZString Base64
+ parseNoteIdByBase64Url: function (_callback) {
+ // try to parse note id by base64url
try {
- var id = LZString.decompressFromBase64(noteId)
+ var id = Note.decodeNoteId(noteId)
if (id && Note.checkNoteIdValid(id)) { return callback(null, id) } else { return _callback(null, null) }
} catch (err) {
return _callback(err, null)