diff --git a/admin_frontend/templates/admin.html b/admin_frontend/templates/admin.html index 4a124845..addb00dd 100644 --- a/admin_frontend/templates/admin.html +++ b/admin_frontend/templates/admin.html @@ -8,7 +8,6 @@ document .getElementById("usersBtn") .addEventListener("click", function () { - // Redirect to the users page. window.location.href = "/web/admin/users"; }); diff --git a/admin_frontend/templates/home.html b/admin_frontend/templates/home.html index 4d38aca8..99d405e0 100644 --- a/admin_frontend/templates/home.html +++ b/admin_frontend/templates/home.html @@ -1,15 +1,14 @@ -
-

User Management

-

Welcome, {{ email }}

+

User Management

+

Welcome, {{ email }}

diff --git a/admin_frontend/templates/login.html b/admin_frontend/templates/login.html index 8a1d80ef..6bcde6d3 100644 --- a/admin_frontend/templates/login.html +++ b/admin_frontend/templates/login.html @@ -39,20 +39,21 @@ "Content-Type": "application/json", }, body: JSON.stringify(data), - credentials: 'same-origin', + credentials: "same-origin", }) - .then((response) => { - if (!response.ok) { - // If HTTP status code is not OK, throw an error with the status text - throw Error(response.statusText); - } - window.location.href = "/web/home"; - }) - .catch((error) => { - console.error("Error:", error); - document.getElementById("response").innerText = - "Login failed: " + error.message; - }); + .then((response) => { + if (!response.ok) { + // If HTTP status code is not OK, throw an error with the status text + throw Error(response.statusText); + } + window.location.href = "/web/home"; + }) + .catch((error) => { + console.error(`Error:, ${error}`); + document.getElementById( + "response", + ).innerText = `Login failed: ${error.message}`; + }); }); diff --git a/admin_frontend/templates/user_details.html b/admin_frontend/templates/user_details.html index 45e45fda..b68f775d 100644 --- a/admin_frontend/templates/user_details.html +++ b/admin_frontend/templates/user_details.html @@ -8,14 +8,14 @@ -