-
-
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
Use RestWrite when verifying emails so hooks are called (as master) #3851
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3851 +/- ##
==========================================
+ Coverage 90.14% 90.21% +0.06%
==========================================
Files 114 114
Lines 7550 7549 -1
==========================================
+ Hits 6806 6810 +4
+ Misses 744 739 -5
Continue to review full report at Codecov.
|
Is there a way to add a test for this? |
Yep! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. I put a question in there....
@@ -58,7 +58,8 @@ const toPostgresValue = value => { | |||
} | |||
|
|||
const transformValue = value => { | |||
if (value.__type === 'Pointer') { | |||
if (typeof value == 'object' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may as well go ===
for consistency :)
@@ -354,7 +354,8 @@ RestWrite.prototype.transformUser = function() { | |||
throw new Parse.Error(Parse.Error.OPERATION_FORBIDDEN, error); | |||
} | |||
|
|||
if (this.query) { | |||
// Do not cleanup session if objectId is not set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. what could go wrong? sorry for not knowing, but what does this solve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That matches all sessions with _User id undefined, which is not cool :)
@acinader @natanrolnik so I went a bit ahead, and made rest.update work with a full query object (maybe @TylerBrock will like that for the updateWhere :)). This allows the guaranteed that all hooks will be properly called (beforeSave, afterSave and liveQuery) for this update. |
fixes #3850