fix: test connection reads form values instead of saved config

The "Kapcsolat tesztelése" button sent an empty POST to /settings/test,
which read from the (possibly empty) config file on disk. Now sends the
current form values so testing works before clicking Save.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 07:53:11 +01:00
parent 95fc8a1976
commit 92912c5890
3 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -39,7 +39,8 @@ async function testConnection() {
result.innerHTML = '<span class="spinner"></span>';
try {
const resp = await fetch('/settings/test', { method: 'POST' });
const form = new FormData(document.querySelector('form'));
const resp = await fetch('/settings/test', { method: 'POST', body: form });
const data = await resp.json();
if (data.ok) {
const v = data.data.version || '?';