mirror of https://github.com/status-im/codimd.git
Fix to log instead of throwing error on parse note id
Signed-off-by: Max Wu <jackymaxj@gmail.com>
This commit is contained in:
parent
c7657ae81e
commit
5e975cbe69
|
@ -216,7 +216,8 @@ module.exports = function (sequelize, DataTypes) {
|
|||
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)
|
||||
logger.error(err)
|
||||
return _callback(null, null)
|
||||
}
|
||||
},
|
||||
parseNoteIdByBase64Url: function (_callback) {
|
||||
|
@ -225,7 +226,8 @@ module.exports = function (sequelize, DataTypes) {
|
|||
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)
|
||||
logger.error(err)
|
||||
return _callback(null, null)
|
||||
}
|
||||
},
|
||||
parseNoteIdByShortId: function (_callback) {
|
||||
|
|
Loading…
Reference in New Issue