-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Not able to run javascript SDK api's from the parse-server cloud code. #762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can anyone reply to this ? |
Can you provide some more information? What are your server settings? What is the response to your request? Have you tried removing the |
I didt try removing alerts, but still I guess this will not work. Is master key required while using JavaScript SDK API ? |
Inside Cloud Code, the JS SDK is initialized automatically. Outside Cloud Code, you probably should not use the master key without a good reason, and you definitely should not send the master key to your users. |
How do we need to use masterkey : true while using JavaScript SDK |
You do that in the options of your query. |
No response in many days, closing. |
Parse.Cloud.beforeSave("test", function(request, response) {
var GameScore = Parse.Object.extend("GameScore");
var gameScore = new GameScore();
gameScore.set("score", 1337);
gameScore.set("playerName", "Sean Plott");
gameScore.set("cheatMode", false);
gameScore.save(null, {
success: function(gameScore) {
alert('New object created with objectId: ' + gameScore.id);
response.success("done");
},
error: function(gameScore, error) {
alert('Failed to create new object, with error code: ' + error.message);
response.error();
}
});
});
Before save is getting called, but the Game Score object is not getting added,
The text was updated successfully, but these errors were encountered: