From 7b904d9a9d2feb42d7357062c82883b0fe7b5cd2 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 2 Aug 2021 11:02:12 +0100 Subject: [PATCH] fix case of WithRevCheck method --- services/docstore/app/js/DocManager.js | 2 +- services/docstore/app/js/MongoManager.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/docstore/app/js/DocManager.js b/services/docstore/app/js/DocManager.js index 17aff5d989..51e3beaf27 100644 --- a/services/docstore/app/js/DocManager.js +++ b/services/docstore/app/js/DocManager.js @@ -172,7 +172,7 @@ module.exports = DocManager = { if (err) { return callback(err) } - MongoManager.WithRevCheck( + MongoManager.withRevCheck( doc, MongoManager.getDocVersion, function (error, version) { diff --git a/services/docstore/app/js/MongoManager.js b/services/docstore/app/js/MongoManager.js index ef90d966ff..456d8c7334 100644 --- a/services/docstore/app/js/MongoManager.js +++ b/services/docstore/app/js/MongoManager.js @@ -199,7 +199,7 @@ module.exports = MongoManager = { // Helper method to support optimistic locking. Call the provided method for // an existing doc and return the result if the rev in mongo is unchanged when // checked afterwards. If the rev has changed, return a DocModifiedError. - WithRevCheck(doc, method, callback) { + withRevCheck(doc, method, callback) { method(doc._id, function (err, result) { if (err) return callback(err) MongoManager.getDocRev(doc._id, function (err, currentRev) {