mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
remove unsupported options argument in count() method of mongojs 1.x
This commit is contained in:
parent
d49997d9f3
commit
c7b4062412
2 changed files with 4 additions and 6 deletions
|
@ -153,10 +153,10 @@ module.exports = MongoManager =
|
|||
db.docHistoryStats.ensureIndex { updates: -1, doc_id: 1 }, { background: true }
|
||||
|
||||
getDocChangesCount: (doc_id, callback)->
|
||||
db.docHistory.count { doc_id : ObjectId(doc_id.toString()), inS3 : { $exists : false }}, {}, callback
|
||||
db.docHistory.count { doc_id : ObjectId(doc_id.toString()), inS3 : { $exists : false }}, callback
|
||||
|
||||
getArchivedDocChanges: (doc_id, callback)->
|
||||
db.docHistory.count { doc_id: ObjectId(doc_id.toString()) , inS3: { $exists: true }}, {}, callback
|
||||
db.docHistory.count { doc_id: ObjectId(doc_id.toString()) , inS3: { $exists: true }}, callback
|
||||
|
||||
markDocHistoryAsArchiveInProgress: (doc_id, update, callback) ->
|
||||
db.docHistory.update { _id: update._id }, { $set : { inS3 : false } }, callback
|
||||
|
|
|
@ -395,7 +395,7 @@ describe "MongoManager", ->
|
|||
describe "getDocChangesCount", ->
|
||||
beforeEach ->
|
||||
@db.docHistory =
|
||||
count: sinon.stub().callsArg(2)
|
||||
count: sinon.stub().callsArg(1)
|
||||
@MongoManager.getDocChangesCount @doc_id, @callback
|
||||
|
||||
it "should return if there is any doc changes", ->
|
||||
|
@ -403,7 +403,6 @@ describe "MongoManager", ->
|
|||
.calledWith({
|
||||
doc_id: ObjectId(@doc_id)
|
||||
inS3 : { $exists : false }
|
||||
}, {
|
||||
})
|
||||
.should.equal true
|
||||
|
||||
|
@ -413,7 +412,7 @@ describe "MongoManager", ->
|
|||
describe "getArchivedDocChanges", ->
|
||||
beforeEach ->
|
||||
@db.docHistory =
|
||||
count: sinon.stub().callsArg(2)
|
||||
count: sinon.stub().callsArg(1)
|
||||
@MongoManager.getArchivedDocChanges @doc_id, @callback
|
||||
|
||||
it "should return if there is any archived doc changes", ->
|
||||
|
@ -421,7 +420,6 @@ describe "MongoManager", ->
|
|||
.calledWith({
|
||||
doc_id: ObjectId(@doc_id)
|
||||
inS3: {$exists: true}
|
||||
}, {
|
||||
})
|
||||
.should.equal true
|
||||
|
||||
|
|
Loading…
Reference in a new issue