-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
response.success() does not return in beforeSave #1205
Comments
yes it doesn't exit the current call stack. Is that a big problem for you? |
How to achieve the same effect as Paser.com? just call return? |
yes, call return response.success(); |
Curious, what are the implications of running code after |
The code will still execute, and you can still save object and etc. but the client will have already received the response. This can actually be useful in some cases, for example we use something like this when sending password reset emails. |
@drew-gross Ah, cool. Thanks. I want to send a Pusher event to clients notifying that an object was updated. Ideally I'd like send the event with info about which attributes changed so that the client only has to fetch the updates, but of course I only have that info in beforeSave. If I send the Pusher event before |
If you want to ensure that the object has been saved, you need to run your logic in |
@drew-gross that's what I figured. I just found out about |
Hmm I don't see any docs. Would you like to add some? Our docs are open source in the https://github.com/ParsePlatform/Docs repo |
@drew-gross okay, in here? Are these docs no longer relevant for parse-server? |
Yep, thats right. The JS SDK docs are still relevant I think, but maybe you could check on the JS SDK repo if you want to delete them. |
in parse.com, the beforeSave returns when response.success() is called, but in parse server, it does not.
tested on parse server 2.2.2
The text was updated successfully, but these errors were encountered: