Skip to content

Commit 7dec71a

Browse files
committed
nits
1 parent 419da58 commit 7dec71a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/Controllers/DatabaseController.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,8 @@ DatabaseController.prototype.find = function(className, query, {
711711
acl,
712712
sort = {},
713713
count,
714-
keys
714+
keys,
715+
op
715716
} = {}) {
716717
let isMaster = acl === undefined;
717718
let aclGroup = acl || [];

src/RestQuery.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,17 @@ RestQuery.prototype.runFind = function(options = {}) {
392392
this.response = {results: []};
393393
return Promise.resolve();
394394
}
395+
let findOptions = Object.assign({}, this.findOptions);
395396
if (this.keys) {
396-
this.findOptions.keys = Array.from(this.keys).map((key) => {
397+
findOptions.keys = Array.from(this.keys).map((key) => {
397398
return key.split('.')[0];
398399
});
399400
}
401+
if (options.op) {
402+
findOptions.op = options.op;
403+
}
400404
return this.config.database.find(
401-
this.className, this.restWhere, this.findOptions, options.op).then((results) => {
405+
this.className, this.restWhere, findOptions).then((results) => {
402406
if (this.className === '_User') {
403407
for (var result of results) {
404408
delete result.password;

0 commit comments

Comments
 (0)