diff --git a/assets/js/action-collector.js b/assets/js/action-collector.js index 3687b36..39a71f9 100644 --- a/assets/js/action-collector.js +++ b/assets/js/action-collector.js @@ -10,12 +10,15 @@ function collectAndExecuteActions(ip, jail = '') { selectedActions.forEach(action => { const scriptUrl = `/includes/actions/action_${action}-ip.php`; + const params = { ip }; + if (jail) params.jail = jail; + fetch(scriptUrl, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, - body: new URLSearchParams({ ip, jail }) + body: new URLSearchParams(params) }) .then(res => res.text()) .then(responseText => {