Merge branch 'master' into release
This commit is contained in:
commit
b37b1940ad
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user