mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-23 19:31:30 +00:00
fix case of WithRevCheck method
This commit is contained in:
parent
50fa9609a3
commit
7b904d9a9d
2 changed files with 2 additions and 2 deletions
|
@ -172,7 +172,7 @@ module.exports = DocManager = {
|
|||
if (err) {
|
||||
return callback(err)
|
||||
}
|
||||
MongoManager.WithRevCheck(
|
||||
MongoManager.withRevCheck(
|
||||
doc,
|
||||
MongoManager.getDocVersion,
|
||||
function (error, version) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue