|
@@ -48,11 +48,10 @@ module.exports = DocManager =
|
|
|
rev: doc.rev
|
|
rev: doc.rev
|
|
|
}, "updating doc lines"
|
|
}, "updating doc lines"
|
|
|
async.series [
|
|
async.series [
|
|
|
- (cb)->
|
|
|
|
|
- # project collection is still primary so that needs to be successful first
|
|
|
|
|
- MongoManager.updateDoc project_id, mongoPath, lines, cb
|
|
|
|
|
(cb)->
|
|
(cb)->
|
|
|
MongoManager.upsertIntoDocCollection project_id, doc_id, lines, doc.rev, cb
|
|
MongoManager.upsertIntoDocCollection project_id, doc_id, lines, doc.rev, cb
|
|
|
|
|
+ (cb)->
|
|
|
|
|
+ MongoManager.updateDoc project_id, mongoPath, lines, cb
|
|
|
], (error)->
|
|
], (error)->
|
|
|
return callback(error) if error?
|
|
return callback(error) if error?
|
|
|
callback null, true, doc.rev + 1 # rev will have been incremented in mongo by MongoManager.updateDoc
|
|
callback null, true, doc.rev + 1 # rev will have been incremented in mongo by MongoManager.updateDoc
|