Skip to content

Commit

Permalink
Update login.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadowacu1 authored May 3, 2024
1 parent ebc53f0 commit ec808ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions My-brand/script/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ form.addEventListener("submit", async (e) => {
const decodedTok = JSON.parse(atob(tokenPayload));
const role = decodedToken.role;

if (role === "client") {
if (role == "client") {
window.location.href = "blog.html";
loader.style.display = "none";
} else {
const message = await response.json();
messageView.innerHTML = message;

messageView.innerHTML = "incorrect Email or Password";
loader.style.display = "none";
}
} else {
Expand Down

0 comments on commit ec808ad

Please sign in to comment.