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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃帹 change gravatar file design #7553

Merged
merged 1 commit into from Oct 13, 2016

Conversation

@kirrg001
Copy link
Contributor

commented Oct 12, 2016

no issue

  • preperation for User model refactoring

When calling a unit, this unit should return a result.
This unit should not modifying an existing object and return it (this is an unexpected behaviour, especially for utils and libs).

gravatar.lookup({email: email})
  .then(function(result) {
        result.image ---> gravatar url
  });
馃帹 change gravatar file design
no issue
- preperation for User model refactoring
- the rule is:
  --> when calling a unit, this unit should return something new
  --> and NOT modifying an existing object and return it (this is an unexpected behaviour, especially for utils and libs)
}).then(function then(results) {
userData = results[0];
userData.slug = results[1];
return gravatar.lookup(userData)

This comment has been minimized.

Copy link
@ErisDS

ErisDS Oct 13, 2016

Member

Do these calls really need to be done one-after-the other?
Maybe a candidate for promise.props ?

This comment has been minimized.

Copy link
@kirrg001

kirrg001 Oct 13, 2016

Author Contributor

this function might die. so this PR only cares about gravatar file design 馃憤

@ErisDS ErisDS merged commit 5b9c213 into TryGhost:master Oct 13, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
mixonic added a commit to mixonic/Ghost that referenced this pull request Oct 28, 2016
馃帹 change gravatar file design (TryGhost#7553)
no issue
- preperation for User model refactoring
- the rule is:
  --> when calling a unit, this unit should return something new
  --> and NOT modifying an existing object and return it (this is an unexpected behaviour, especially for utils and libs)
madfrog2047 added a commit to madfrog2047/Ghost that referenced this pull request Nov 20, 2016
馃帹 change gravatar file design (TryGhost#7553)
no issue
- preperation for User model refactoring
- the rule is:
  --> when calling a unit, this unit should return something new
  --> and NOT modifying an existing object and return it (this is an unexpected behaviour, especially for utils and libs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.