normalize user input
Build LinkLog Development Image / development-image (push) Successful in 10s

This commit is contained in:
2026-08-26 14:35:41 +02:00
parent d18acf813a
commit b3383e29a7
4 changed files with 9 additions and 1 deletions
+2 -1
View File
@@ -63,6 +63,7 @@ async function saveSettingsAndLogin(event) {
const backendUrl = backendUrlInput.value.trim();
const username = usernameInput.value.trim();
const password = passwordInput.value;
const otp = otpInput.value.trim();
if (!backendUrl || !username || !password) {
setStatus(t('fillAllFields'), true);
@@ -73,7 +74,7 @@ async function saveSettingsAndLogin(event) {
const response = await fetch(`${backendUrl}/api/auth/login`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ username, password, otp: otpInput.value.trim() || null })
body: JSON.stringify({ username, password, otp: otp || null })
});
if (!response.ok) {