forked from CSI-KJSCE/appointment_to_examiner
minor
This commit is contained in:
@@ -19,7 +19,7 @@ function App() {
|
|||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<AuthPage />}></Route>
|
<Route path="/" element={<AuthPage />}></Route>
|
||||||
<Route path="/course-form/:id" element={<PrivateRoute element={<CourseForm />} />} />
|
<Route path="/course-form/:id" element={<PrivateRoute element={<CourseForm />} />} />
|
||||||
<Route path="/Welcom" element={<PrivateRoute element={<WelcomeWithFilter />} />} />
|
<Route path="/Welcome" element={<PrivateRoute element={<WelcomeWithFilter />} />} />
|
||||||
<Route path="/Home" element={<HomePage />}></Route>
|
<Route path="/Home" element={<HomePage />}></Route>
|
||||||
<Route path="/ForgetPw" element={<ForgetPwPage />}></Route>
|
<Route path="/ForgetPw" element={<ForgetPwPage />}></Route>
|
||||||
<Route path="/ResetPw/:token" element={<ResetPwPage />}></Route>
|
<Route path="/ResetPw/:token" element={<ResetPwPage />}></Route>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const Navbar = () => {
|
|||||||
return (
|
return (
|
||||||
<header className="navbar">
|
<header className="navbar">
|
||||||
<div className="navbar-container">
|
<div className="navbar-container">
|
||||||
<NavLink to="/Welcom">
|
<NavLink to="/Welcome">
|
||||||
<FaUserCircle className="user-icon" />
|
<FaUserCircle className="user-icon" />
|
||||||
Appointment To Examiner
|
Appointment To Examiner
|
||||||
</NavLink>
|
</NavLink>
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ app.get(
|
|||||||
const token = jwt.sign({ userId: req.user._id }, process.env.JWT_SECRET, { expiresIn: "1h" });
|
const token = jwt.sign({ userId: req.user._id }, process.env.JWT_SECRET, { expiresIn: "1h" });
|
||||||
// Set token as a cookie or send it in the response
|
// Set token as a cookie or send it in the response
|
||||||
res.cookie("token", token, { httpOnly: false, secure: false });
|
res.cookie("token", token, { httpOnly: false, secure: false });
|
||||||
res.redirect("http://localhost:3000/Welcom"); // Redirect to a frontend route after successful login
|
res.redirect("http://localhost:3000/Welcome"); // Redirect to a frontend route after successful login
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user