Skip to content

Commit 135b0e0

Browse files
committed
Remove options from count
1 parent e444ca8 commit 135b0e0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Adapters/Storage/Mongo/MongoStorageAdapter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ export class MongoStorageAdapter {
206206
}
207207

208208
// Executs a count.
209-
count(className, query, { skip }) {
209+
count(className, query) {
210210
return this.adaptiveCollection(className)
211-
.then(collection => collection.count(query, { skip }));
211+
.then(collection => collection.count(query));
212212
}
213213

214214
get transform() {

src/Controllers/DatabaseController.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,7 @@ DatabaseController.prototype.find = function(className, query, {
697697
validateQuery(query);
698698
if (count) {
699699
let mongoWhere = this.transform.transformWhere(className, query, schema);
700-
delete mongoOptions.limit;
701-
return this.adapter.count(className, mongoWhere, mongoOptions);
700+
return this.adapter.count(className, mongoWhere);
702701
} else {
703702
return this.adapter.find(className, query, mongoOptions, schema)
704703
.then(objects => objects.map(object => filterSensitiveData(isMaster, aclGroup, className, object)));

0 commit comments

Comments
 (0)