summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWu Cheng-Han2016-10-11 00:55:38 +0800
committerWu Cheng-Han2016-10-11 00:55:38 +0800
commitbc74c1f0cb4e146d7944cea37fb1afbe6772fd71 (patch)
tree689bd193d20e21286a4f9804cc68bd246033e225 /lib
parent0cbe638ebabc021f6a502c1b7faf947e3c28c784 (diff)
Fix doc updating revision not stringify and compress authorship before save
Diffstat (limited to 'lib')
-rw-r--r--lib/models/note.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/models/note.js b/lib/models/note.js
index 6efa5d4f..7fdc5645 100644
--- a/lib/models/note.js
+++ b/lib/models/note.js
@@ -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) {