Skip to content

Commit

Permalink
Update UI, logout
Browse files Browse the repository at this point in the history
  • Loading branch information
NVCLong committed Dec 20, 2023
1 parent b4b9566 commit ff3c021
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/app/Controller/UserController.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class UserController {
}
const validPassword = await bcrypt.compare(password, doctor.password);
if (!validPassword) {
res.status(200).json("Different password");
res.status(200).redirect('/authentication/doctor/login');
} else if (validPassword && doctor) {
let accessToken=jwt.sign(
{
Expand Down Expand Up @@ -148,7 +148,7 @@ class UserController {
}
const validPassword = await bcrypt.compare(password, patient.password);
if (!validPassword) {
res.status(200).json("Different password");
res.status(200).redirect("/authentication/");
} else if (validPassword && patient) {
let accessToken=jwt.sign(
{
Expand Down

0 comments on commit ff3c021

Please sign in to comment.