add controller and service for create user

This commit is contained in:
rafiarrafif
2025-05-07 03:46:22 +07:00
parent c6367c3689
commit 32dc3dae4a
9 changed files with 118 additions and 10 deletions

View 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);
};