File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 190
190
// Check if data extraction query is valid
191
191
validKeys ( ) {
192
192
for ( let key in this . query ) {
193
- let value = this . query . key ;
194
- if ( key == "query" ) {
195
- return true ;
196
- }
193
+ let value = this . query [ key ] ;
197
194
// Check fields property, fields should have a maximum of 10 itens
198
195
if ( key == "fields" ) {
199
196
if ( value . constructor != Array ) {
210
207
if ( value . constructor != Number ) {
211
208
throw new errors . InvalidQueryError ( "The key 'limit' in query has a invalid value." ) ;
212
209
}
213
- else if ( value > 100 ) {
214
- throw new errors . InvalidQueryError ( "The field 'limit' has a value max of 100." ) ;
215
- }
216
- }
217
- else {
218
- throw new errors . InvalidQueryError ( "This query have the " + key + " invalid key." ) ;
219
210
}
220
211
}
221
212
return true ;
You can’t perform that action at this time.
0 commit comments