Skip to content

Create beforeUpdate and beforeSave/New cloud functions #4468

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

Closed
grosscorporation opened this issue Dec 28, 2017 · 1 comment
Closed

Create beforeUpdate and beforeSave/New cloud functions #4468

grosscorporation opened this issue Dec 28, 2017 · 1 comment

Comments

@grosscorporation
Copy link

Is there a work around, maybe it's there lying in plain sight

@flovilmart
Copy link
Contributor

Check req.object.isNew() this will be true for new objects, and false if the object is being updated. Another trick would be to use the createdAt / updatedAt properties.

See: http://parseplatform.org/Parse-SDK-JS/api/v1.11.0/Parse.User.html#isNew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant