Bläddra i källkod

Log out version when updating doc

James Allen 10 år sedan
förälder
incheckning
50f2983912

+ 2 - 0
services/docstore/app/coffee/DocManager.coffee

@@ -61,6 +61,8 @@ module.exports = DocManager =
 					oldDocLines: doc?.lines
 					newDocLines: lines
 					rev: oldRev
+					oldVersion: doc?.version
+					newVersion: version
 				}, "updating doc lines"
 				MongoManager.upsertIntoDocCollection project_id, doc_id, lines, (error)->
 					return callback(callback) if error?

+ 2 - 0
services/docstore/test/unit/coffee/DocManagerTests.coffee

@@ -196,6 +196,8 @@ describe "DocManager", ->
 						oldDocLines: @oldDocLines
 						newDocLines: @newDocLines
 						rev: @doc.rev
+						oldVersion: @version
+						newVersion: @version
 						"updating doc lines"
 					)
 					.should.equal true