diff --git a/nfoguard-web/static/js/app.js b/nfoguard-web/static/js/app.js index 317535b..e06fd3d 100644 --- a/nfoguard-web/static/js/app.js +++ b/nfoguard-web/static/js/app.js @@ -84,7 +84,7 @@ function initializeEventListeners() { document.getElementById('custom-scan-form').addEventListener('submit', handleCustomScan); // Custom directory input auto-formatting - document.getElementById('custom-directory').addEventListener('input', handleDirectoryFormatting); + document.getElementById('scan-path').addEventListener('input', handleDirectoryFormatting); } // API calls @@ -1444,16 +1444,16 @@ async function handleManualScan(event) { async function handleCustomScan(event) { event.preventDefault(); - const customDirectory = document.getElementById('custom-directory').value.trim(); - const customScanMode = document.getElementById('custom-scan-mode').value; + const customDirectory = document.getElementById('scan-path').value.trim(); + const customScanType = document.getElementById('custom-scan-type').value; if (!customDirectory) { showToast('Please enter a directory path', 'warning'); return; } - if (!customScanMode) { - showToast('Please select a scan mode', 'warning'); + if (!customScanType) { + showToast('Please select a scan type', 'warning'); return; } @@ -1465,7 +1465,7 @@ async function handleCustomScan(event) { method: 'POST', body: JSON.stringify({ directory: customDirectory, - scan_mode: customScanMode + scan_type: customScanType }) });