-
-
Notifications
You must be signed in to change notification settings - Fork 598
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
beforeSave issues with dirtyKeys #31
Comments
Currently this is not supported by webhooks. The dirty keys are not passed to webhooks by the Parse backend according to the current spec (https://www.parse.com/docs/js/guide#cloud-code-advanced-beforesave-webhooks), so the JS SDK can't populate this field in Node.js. However, we are always looking to improve the platform. Could you talk more about your use case and why you need this information? |
Thanks for the reference, I was looking all over for this. I am relying on some node.js plugins that I can't implement in CloudCode, so I made a quick decision to move all code to Heroku (without noticing the dirtyKeys limitation). I want to avoid maintaining server side logic in too many places :) I am often using the change of a key's value as a trigger to another action, e.g. updating a related object. I do not want to trigger these actions on every save, but only if a specific key's value is changed. I am also validating keys if they are dirty, e.g. to set a default value or verify it is not undefined. Would it be possible to somehow trigger a warning log message if unsupported functions are used? Thanks!
|
@Zicker are you referring to code running in Node.js, or on Parse Cloud Code? That said, the behavior you mention should still be supported in 1.6. We have tests that suggest it works in the current version (1.6.4) |
I am running my CloudCode on a node.js server, using webhooks as described in a recent blog post on parse.com, and using CloudCode-Express.
Everything seems to run smooth, however in my beforeSave triggers I need to check if certain keys are dirty and they never are?
Is this a bug, or am I doing something wrong? Running the same triggers on CloudCode on Parse.com (non-self-hosted), works as expected.
The text was updated successfully, but these errors were encountered: