Skip to content

Commit 569f651

Browse files
authored
Merge pull request #10 from SlicingDice/feature/remove-limit-check-data-extraction
Remove limit check on data extraction queries
2 parents 7afada4 + 2694d6b commit 569f651

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/slicer.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,7 @@
190190
// Check if data extraction query is valid
191191
validKeys() {
192192
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];
197194
// Check fields property, fields should have a maximum of 10 itens
198195
if (key == "fields") {
199196
if (value.constructor != Array) {
@@ -210,12 +207,6 @@
210207
if (value.constructor != Number){
211208
throw new errors.InvalidQueryError("The key 'limit' in query has a invalid value.");
212209
}
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.");
219210
}
220211
}
221212
return true;

0 commit comments

Comments
 (0)