Autofix on save

This commit is contained in:
Adam Stachowicz
2021-07-27 19:47:13 +02:00
parent 8331e795e7
commit 9648d700d7
29 changed files with 1182 additions and 1089 deletions

View File

@@ -1,5 +1,5 @@
const passwordHashOld = require('password-hash');
const bcrypt = require('bcrypt');
const passwordHashOld = require("password-hash");
const bcrypt = require("bcrypt");
const saltRounds = 10;
exports.generate = function (password) {
@@ -9,9 +9,9 @@ exports.generate = function (password) {
exports.verify = function (password, hash) {
if (isSHA1(hash)) {
return passwordHashOld.verify(password, hash)
} else {
return bcrypt.compareSync(password, hash);
}
return bcrypt.compareSync(password, hash);
}
function isSHA1(hash) {