feat: return Promise<string?
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import bcrypt from "bcrypt";
|
import bcrypt from "bcrypt";
|
||||||
|
|
||||||
export const hashPassword = (password: string) => {
|
export const hashPassword = (password: string): Promise<string> => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
bcrypt.genSalt(12, (err, salt) => {
|
bcrypt.genSalt(12, (err, salt) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user