Recently Parse.com has announced the Parse.Config feature. However, in cloud code, trying to access Parse.Config always returns undefined.
Parse.Cloud.define("search", function(req, res) {
Parse.Config.get().then(function(config) {
// This line is never reached.
});
}
Did I do something wrong?
Your Cloud Code is probably running with an older version of the SDK that does not yet support Parse Config.
You can set the version of the SDK to use as follows:
parse jssdk 1.3.0
This will set the SDK version your code uses to v1.3.0 of the Parse JavaScript SDK and Parse Config should work then.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With