refactor(lst): register added in

This commit is contained in:
2025-02-21 15:26:56 -06:00
parent 9719451580
commit 026583815c
31 changed files with 529 additions and 385 deletions

View File

@@ -0,0 +1,17 @@
import bcrypt from "bcrypt";
export const createPassword = async (password: string) => {
// encypt password
let pass: string | undefined = process.env.SECRET;
let salt: string | undefined = process.env.SALTING;
if (!pass || !salt) {
pass = "error";
} else {
pass = bcrypt.hashSync(process.env.SECRET + password, parseInt(salt));
pass = btoa(pass);
}
return pass;
};