From 8b8b23351095e28381f1b6deab86935e395b49c7 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 23 Sep 2024 23:53:35 +0530 Subject: [PATCH] fix: missinge xports --- server/src/utils/auth.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/src/utils/auth.ts b/server/src/utils/auth.ts index d46fad29..d7eb5751 100644 --- a/server/src/utils/auth.ts +++ b/server/src/utils/auth.ts @@ -1,6 +1,6 @@ import bcrypt from "bcrypt"; -const hashPassword = (password) => { +export const hashPassword = (password) => { return new Promise((resolve, reject) => { bcrypt.genSalt(12, (err, salt) => { if (err) { @@ -17,8 +17,6 @@ const hashPassword = (password) => { } // password from frontend and hash from database -const comparePassword = (password, hash) => { +export const comparePassword = (password, hash) => { return bcrypt.compare(password, hash) -} - -module.exports = { hashPassword, comparePassword } \ No newline at end of file +} \ No newline at end of file