You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
beforeSave success callback works differently for api.parse.com and parse-server.
Passing the object to success fails to update fields on parse-server but correctly updates fields on api.parse.com
This has been described in #1031, #866 already.
success: function(response){// Use the JSON responseif(response&&request.triggerName===Types.beforeSave){returnresolve(response);}response={};if(request.triggerName===Types.beforeSave){response['object']=request.object._getSaveJSON();}returnresolve(response);},
The first if breaks the code, and was added by @flovilmart in 9ac7a52 to support webhooks. Could we do something on the lines of:
Yep good catch, open a PR, and make sure the tests around the webhooks (and others) are good too. Some users as @TylerBrock are moving to that strategy so they would expect it to work correctly.
beforeSave
success callback works differently for api.parse.com and parse-server.Passing the object to success fails to update fields on parse-server but correctly updates fields on api.parse.com
This has been described in #1031, #866 already.
Steps to reproduce
Expected Results
Retrieved object has fields set in before save missing
Actual Outcome
Retrieved object should have fields set in before save present
Environment Setup
Logs/Trace
The root cause is https://github.com/ParsePlatform/parse-server/blob/b2183680be18ffc6c5b90e2fc2260bede571c2b3/src/triggers.js#L133-L136
copied below:
The first if breaks the code, and was added by @flovilmart in 9ac7a52 to support webhooks. Could we do something on the lines of:
I can open this PR and write a couple of tests if this makes sense?
The text was updated successfully, but these errors were encountered: