@@ -209,20 +209,20 @@ module.exports = function (sequelize, DataTypes) {
209209 return _callback ( err , null )
210210 } )
211211 } ,
212- parseNoteIdByBase64Url : function ( _callback ) {
213- // try to parse note id by base64url
212+ // parse note id by LZString is deprecated, here for compability
213+ parseNoteIdByLZString : function ( _callback ) {
214+ // try to parse note id by LZString Base64
214215 try {
215- var id = Note . decodeNoteId ( noteId )
216+ var id = LZString . decompressFromBase64 ( noteId )
216217 if ( id && Note . checkNoteIdValid ( id ) ) { return callback ( null , id ) } else { return _callback ( null , null ) }
217218 } catch ( err ) {
218219 return _callback ( err , null )
219220 }
220221 } ,
221- // parse note id by LZString is deprecated, here for compability
222- parseNoteIdByLZString : function ( _callback ) {
223- // try to parse note id by LZString Base64
222+ parseNoteIdByBase64Url : function ( _callback ) {
223+ // try to parse note id by base64url
224224 try {
225- var id = LZString . decompressFromBase64 ( noteId )
225+ var id = Note . decodeNoteId ( noteId )
226226 if ( id && Note . checkNoteIdValid ( id ) ) { return callback ( null , id ) } else { return _callback ( null , null ) }
227227 } catch ( err ) {
228228 return _callback ( err , null )
0 commit comments