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