@davimacedo Sorry for the confusion. For example, below is the restful sample from:
curl -X GET \
-H "X-Parse-Application-Id: APPLICATION_ID" \
-H "X-Parse-REST-API-Key: REST_API_KEY" \
-G \
--data-urlencode 'where={"score":{"$gte":1000,"$lte":3000}}' \
https://YOUR.PARSE-SERVER.HERE/parse/classes/GameScore
I think the process flow on parse server side should be something like:
let whereJson = query.where; // {"score":{"$gte":1000,"$lte":3000}}
let result = XXX.findMethod(whereJson, GameScore); // return the query result with where filter
And now assuming that the 3000 can not be passed from client, which need to be calculated on server side based on APPLICATION_ID instead. To achieve this, seems we could only use cloud code? Something as below:
let lteValue = getLteValue(APPLICATION_ID); // maybe stored in the mongodb
let whereJson = query.where;
whereJson.score.$lte = lteValue; // construct the $lte attribute value on server side
let result = XXX.findMethod(whereJson, GameScore); // return the query result with where filter
So, my question is: is the XXX.findMethod or similar api (which accepts where filter json as input parameter) exists?
If still anything unclear, please just let me know. Thanks!