Fix bug in accounts.js

main
sudoer777 2021-11-25 12:41:22 -07:00
parent 06765455f6
commit 23e85b7af3
1 changed files with 1 additions and 1 deletions

View File

@ -53,11 +53,11 @@ passport.deserializeUser((id, cb) => {
async function generateHash(password) {
const salt = bcrypt.genSaltSync();
return bcrypt.hashSync(password, salt);
}
async function create(email, password, isAdmin) {
const salt = bcrypt.genSaltSync();
const hash = await generateHash(password);
const query = `INSERT INTO accounts.users(email, password, admin)