add controller and service for create user
This commit is contained in:
6
src/helpers/security/password/hash.ts
Normal file
6
src/helpers/security/password/hash.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import bcrypt from "bcrypt";
|
||||
|
||||
export const hashPassword = async (password: string): Promise<string> => {
|
||||
const saltRounds = Number(process.env.SALT_ROUNDS);
|
||||
return await bcrypt.hash(password, saltRounds);
|
||||
};
|
||||
Reference in New Issue
Block a user