Clean authData of null values on _User update#1199
Clean authData of null values on _User update#1199flovilmart merged 3 commits intoparse-community:masterfrom
Conversation
Current coverage is
|
|
@yuzeh please add unit tests to make sure the fix is correct and doing what's expected the cleaning is currently tested here https://github.com/ParsePlatform/parse-server/blob/master/spec/OAuth.spec.js#L263 |
|
Hi @flovilmart, I've added a test case that exercises this functionality (if I undo the code in src/, the test will fail). I'm not sure if this is the best place to put it, though. Please advise! |
|
@yuzeh updated the pull request. |
|
Can you rebase / squash all those commits? |
481a3d6 to
592daf4
Compare
Adds a step to the RestWrite#execute chain: it cleans the response
authData object of null values.
For example, this:
{"authData": {"anonymous": null}, "updatedAt", ...}
will be transformed to this:
{"updatedAt", ...}
And this:
{"authData": {"anonymous": null, "twitter": ...}, "updatedAt", ...}
will be transformed to this:
{"authData": {"twitter": ...}, "updatedAt", ...}
Fixing this issue will fix anonymous user upgrades from the Android SDK.
592daf4 to
1b8e613
Compare
|
@flovilmart done. BTW, I noticed I currently can't use my fork of parse-server as a dependency in NPM. Is there an easy way to fix this? |
|
There is still an extra commit.... |
|
And to answer your question, there is an 'easy' way through git submodules and npm link |
|
I'm still having a problem with a user having authData set to {"facebook": null} running parse-server 2.2.10 |
Note: I haven't been able to test this because I'm still trying to figure out how to get my project to depend on my fork of parse-server.
Adds a step to the RestWrite#execute chain: it cleans the response
authData object of null values.
For example, this:
will be transformed to this:
And this:
will be transformed to this:
Fixing this issue will fix anonymous user upgrades from the Android SDK.