Skip to content

Commit

Permalink
Remove redundant variables (thelounge#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-tp authored and xPaw committed Jun 12, 2016
1 parent bc72252 commit c97b041
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/clientManager.js
Expand Up @@ -122,10 +122,8 @@ ClientManager.prototype.readUserConfig = function(name) {
if (users.indexOf(name) === -1) {
return false;
}
var user = {};
var data = fs.readFileSync(Helper.getUserConfigPath(name), "utf-8");
user = JSON.parse(data);
return user;
return JSON.parse(data);
};

ClientManager.prototype.removeUser = function(name) {
Expand Down
4 changes: 1 addition & 3 deletions src/command-line/reset.js
Expand Up @@ -22,9 +22,7 @@ program
if (err) {
return;
}
var salt = bcrypt.genSaltSync(8);
var hash = bcrypt.hashSync(password, salt);
user.password = hash;
user.password = bcrypt.hashSync(password, bcrypt.genSaltSync(8));
fs.writeFileSync(
file,
JSON.stringify(user, null, " ")
Expand Down

0 comments on commit c97b041

Please sign in to comment.