Skip to content

Commit

Permalink
Merge pull request #80 from goldblade/hotfix/ranking
Browse files Browse the repository at this point in the history
Add Format Rounded Score User
  • Loading branch information
rtarantelli authored Nov 19, 2018
2 parents 71c4480 + 01e3610 commit be83511
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const find = async (userId, isCoreTeam = false) => {
slackId: userId,
isCoreTeam: isCoreTeam
}).exec();
result.score = parseInt(result.score);
result.score = result.score.toFixed(1);

return result || _throw("Error finding a specific user");
};
Expand All @@ -119,7 +119,7 @@ export const findAll = async (isCoreTeam = false, limit = 20) => {
.limit(limit)
.exec();
result.map(user => {
user.score = parseInt(user.score);
user.score = user.score.toFixed(1);
});

return result || _throw("Error finding all users");
Expand Down

0 comments on commit be83511

Please sign in to comment.