From 37dab830bfc4a6afe1bd705462ac8bc5ef5fc7d5 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Tue, 24 Sep 2024 17:45:05 +0530 Subject: [PATCH] fix: remove hashedPassword var --- server/src/routes/auth.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/src/routes/auth.ts b/server/src/routes/auth.ts index 3a95775d..8ebb92a5 100644 --- a/server/src/routes/auth.ts +++ b/server/src/routes/auth.ts @@ -18,8 +18,6 @@ router.post('/register', async (req, res) => { let userExist = await User.findOne({ where: { email } }); if (userExist) return res.status(400).send('User already exists') - const hashedPassword = await hashPassword(password) - const user = await User.create({ email, password }); const token = jwt.sign({ id: user.id }, process.env.JWT_SECRET as string, { expiresIn: '1h' });