diff --git a/My-brand/script/login.js b/My-brand/script/login.js index c69e6f2..0fe17c0 100644 --- a/My-brand/script/login.js +++ b/My-brand/script/login.js @@ -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 {