From a8f7194cec6191c2d8101560ed4700f6c9b2f52f Mon Sep 17 00:00:00 2001 From: "testbot-codemonk[bot]" <161732285+testbot-codemonk[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 08:58:20 +0000 Subject: [PATCH] Update files in Job-posting-redirection-44 --- routes/authRoutes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/authRoutes.js b/routes/authRoutes.js index 2d443df..caa1f26 100644 --- a/routes/authRoutes.js +++ b/routes/authRoutes.js @@ -35,7 +35,7 @@ router.post('/register', async (req, res) => { const user = new User({ username, password, email, domainOfInterest, linkedinUrl, currentCompany, currentLevel }); await user.save(); req.session.userId = user._id; - res.redirect('/login'); // Modified line: Redirecting user to login page after successful registration + res.redirect('/'); // Redirecting user to the index page after successful registration for a better user experience } catch (error) { res.status(500).json({ message: 'Error registering user', error: error.message }); }