Fix doc updating revision not stringify and compress authorship before save

This commit is contained in:
Wu Cheng-Han 2016-10-11 00:55:38 +08:00
parent 0cbe638eba
commit bc74c1f0cb

View file

@ -142,7 +142,7 @@ module.exports = function (sequelize, DataTypes) {
authorship = Note.updateAuthorshipByOperation(operations[i], null, authorship);
}
note.update({
authorship: authorship
authorship: LZString.compressToBase64(JSON.stringify(authorship))
}).then(function (note) {
return callback(null, note.id);
}).catch(function (err) {