@@ -139,7 +139,7 @@ const valueAsDate = value => {
139
139
return false ;
140
140
}
141
141
142
- function transformQueryKeyValue ( schema , className , key , value , { validate } = { } , parseFormatSchema ) {
142
+ function transformQueryKeyValue ( className , key , value , { validate } = { } , parseFormatSchema ) {
143
143
switch ( key ) {
144
144
case 'createdAt' :
145
145
if ( valueAsDate ( value ) ) {
@@ -168,12 +168,12 @@ function transformQueryKeyValue(schema, className, key, value, { validate } = {}
168
168
if ( ! ( value instanceof Array ) ) {
169
169
throw new Parse . Error ( Parse . Error . INVALID_QUERY , 'bad $or format - use an array value' ) ;
170
170
}
171
- return { key : '$or' , value : value . map ( subQuery => transformWhere ( schema , className , subQuery , { } , parseFormatSchema ) ) } ;
171
+ return { key : '$or' , value : value . map ( subQuery => transformWhere ( className , subQuery , { } , parseFormatSchema ) ) } ;
172
172
case '$and' :
173
173
if ( ! ( value instanceof Array ) ) {
174
174
throw new Parse . Error ( Parse . Error . INVALID_QUERY , 'bad $and format - use an array value' ) ;
175
175
}
176
- return { key : '$and' , value : value . map ( subQuery => transformWhere ( schema , className , subQuery , { } , parseFormatSchema ) ) } ;
176
+ return { key : '$and' , value : value . map ( subQuery => transformWhere ( className , subQuery , { } , parseFormatSchema ) ) } ;
177
177
default :
178
178
// Other auth data
179
179
const authDataMatch = key . match ( / ^ a u t h D a t a \. ( [ a - z A - Z 0 - 9 _ ] + ) \. i d $ / ) ;
@@ -222,13 +222,13 @@ function transformQueryKeyValue(schema, className, key, value, { validate } = {}
222
222
// restWhere is the "where" clause in REST API form.
223
223
// Returns the mongo form of the query.
224
224
// Throws a Parse.Error if the input query is invalid.
225
- function transformWhere ( schema , className , restWhere , { validate = true } = { } , parseFormatSchema ) {
225
+ function transformWhere ( className , restWhere , { validate = true } = { } , parseFormatSchema ) {
226
226
let mongoWhere = { } ;
227
227
if ( restWhere [ 'ACL' ] ) {
228
228
throw new Parse . Error ( Parse . Error . INVALID_QUERY , 'Cannot query on ACL.' ) ;
229
229
}
230
230
for ( let restKey in restWhere ) {
231
- let out = transformQueryKeyValue ( schema , className , restKey , restWhere [ restKey ] , { validate } , parseFormatSchema ) ;
231
+ let out = transformQueryKeyValue ( className , restKey , restWhere [ restKey ] , { validate } , parseFormatSchema ) ;
232
232
mongoWhere [ out . key ] = out . value ;
233
233
}
234
234
return mongoWhere ;
0 commit comments