refactor(server): moved the server files outside the src to improve static files

This commit is contained in:
2025-03-01 15:23:42 -06:00
parent d3acdfb481
commit 89a2b3ea9e
28 changed files with 4592 additions and 2253 deletions

View File

@@ -0,0 +1,16 @@
import bcrypt from "bcrypt";
export const checkPassword = async (currentPassword: string, dbPassword: string) => {
let decyptPass = "";
try {
decyptPass = atob(dbPassword);
} catch (error) {
console.log(error);
}
// encypt password
const pass: string | undefined = process.env.SECRET;
const checked = bcrypt.compareSync(pass + currentPassword, decyptPass);
return checked;
};