[Eliminate Blocking] User related (#5928)

This commit is contained in:
Louis Lam
2025-06-19 14:29:43 +08:00
committed by GitHub
parent 443d5cf554
commit 4962817795
6 changed files with 8 additions and 8 deletions

View File

@@ -5,10 +5,10 @@ const saltRounds = 10;
/**
* Hash a password
* @param {string} password Password to hash
* @returns {string} Hash
* @returns {Promise<string>} Hash
*/
exports.generate = function (password) {
return bcrypt.hashSync(password, saltRounds);
return bcrypt.hash(password, saltRounds);
};
/**