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! |
acinader
left a comment
There was a problem hiding this comment.
looks good. I put a question in there....
|
|
||
| const transformValue = value => { | ||
| if (value.__type === 'Pointer') { | ||
| if (typeof value == 'object' && |
| } | ||
|
|
||
| if (this.query) { | ||
| // Do not cleanup session if objectId is not set |
There was a problem hiding this comment.
Hm. what could go wrong? sorry for not knowing, but what does this solve?
There was a problem hiding this comment.
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