diff --git a/frontend/login.mts b/frontend/login.mts index 2f4952c..7a76a74 100644 --- a/frontend/login.mts +++ b/frontend/login.mts @@ -23,8 +23,6 @@ document.addEventListener('DOMContentLoaded', () => { if (Elements.passwordInput.value == null || Elements.passwordInput.value === '') return errReset('Password is required!', Elements.submitButton); - alert(`Attempting to login user [${Elements.usernameInput.value}]`); - fetch('/api/login', { method: 'POST', headers: { 'Content-Type': 'application/json' }, diff --git a/frontend/setup.mts b/frontend/setup.mts index 15c5511..1ef28a2 100644 --- a/frontend/setup.mts +++ b/frontend/setup.mts @@ -105,8 +105,8 @@ document.addEventListener('DOMContentLoaded', () => { success: boolean, message: string }) => { - alert(data.message); - if (data.success) window.location.href = '/login'; + if (data.success) window.location.href = '/admin'; + else alert(data.message); }); }) .catch((err) => errAlert('POST to /api/setup failed!', err))