Skip to content
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

Adds a new replaceUser method to Security #208

Merged
merged 2 commits into from
Apr 26, 2017
Merged

Conversation

samniisan
Copy link
Contributor

@codecov-io
Copy link

codecov-io commented Apr 21, 2017

Codecov Report

Merging #208 into 5.x will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              5.x     #208      +/-   ##
==========================================
+ Coverage   99.41%   99.42%   +<.01%     
==========================================
  Files          16       16              
  Lines        1718     1733      +15     
  Branches      458      465       +7     
==========================================
+ Hits         1708     1723      +15     
  Misses         10       10
Impacted Files Coverage Δ
src/security/Security.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71bb318...c7c2554. Read the comment docs.

action = options.replaceIfExist ? 'createOrReplaceUser' : 'createUser';
if (options && options.replaceIfExist) {
self.fetchUser(id, function (fetchError, fetchResult) {
if (fetchResult instanceof User && options && options.replaceIfExist === true) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can reject the query here if fetchUser return a user and options.replaceIfExist !== true without querying kuzzle

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, PR updated

@stafyniaksacha stafyniaksacha merged commit 332b4b1 into 5.x Apr 26, 2017
@stafyniaksacha stafyniaksacha deleted the 21-replace-user branch April 26, 2017 15:22
@jenow jenow restored the 21-replace-user branch April 26, 2017 15:27
@jenow jenow deleted the 21-replace-user branch May 12, 2017 09:10
This was referenced May 24, 2017
@scottinet scottinet mentioned this pull request Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants