 {
                    alert('Server IP updated successfully');
                } else {
                    alert('Failed to update server IP: ' + (data.error || 'Unknown error'));
                }
            } catch (error) {
                alert('Failed to update server IP: ' + error);
            }
        }

        async function updateServerPort() {
            const serverPort = document.getElementById('serverPort').value;
            try {
                const response = await fetch('/api/updat