From 8d29edc6345a3103ac3bb859f1d04940bd196e28 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Wed, 25 Sep 2024 18:43:09 +0530 Subject: [PATCH] feat: set password as string --- server/src/utils/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/utils/auth.ts b/server/src/utils/auth.ts index 4cc45644..8c4be451 100644 --- a/server/src/utils/auth.ts +++ b/server/src/utils/auth.ts @@ -1,6 +1,6 @@ import bcrypt from "bcrypt"; -export const hashPassword = (password: any) => { +export const hashPassword = (password: string) => { return new Promise((resolve, reject) => { bcrypt.genSalt(12, (err, salt) => { if (err) { @@ -17,6 +17,6 @@ export const hashPassword = (password: any) => { } // password from frontend and hash from database -export const comparePassword = (password: any, hash: any) => { +export const comparePassword = (password: string, hash: any) => { return bcrypt.compare(password, hash) } \ No newline at end of file