fix fix fix !!!!!!

This commit is contained in:
Jay 2018-08-23 20:25:34 +08:00
parent dc14d9cbf5
commit aa0309cbe6
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ const hashPassword = async (pass = '') => {
const comparePassword = async (password = '', hash = '') => {
if (typeof password !== 'string' || password.trim().length === 0) return false
if (typeof hash !== 'string' || hash.trim().length === 0) return false
let check = new Promise((resolve, reject) => {
let check = await new Promise((resolve, reject) => {
bcrypt.compare(password, hash, (err, res) => {
if (err) {
resolve(false)