|
@@ -3411,21 +3411,6 @@ async function toggleGeoCountry(code, enabled) {
|
|
|
showToast('Error', err.message, 'error');
|
|
showToast('Error', err.message, 'error');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- method: 'POST',
|
|
|
|
|
- headers: { 'Content-Type': 'application/json' },
|
|
|
|
|
- body: JSON.stringify({ enabled })
|
|
|
|
|
- });
|
|
|
|
|
- if (res.ok) {
|
|
|
|
|
- showToast(enabled ? 'Country Enabled' : 'Country Disabled', `${code} ${enabled ? 'active in firewall' : 'removed from firewall'}`, 'success');
|
|
|
|
|
- loadGeoIP();
|
|
|
|
|
- } else {
|
|
|
|
|
- const err = await res.json();
|
|
|
|
|
- showToast('Error', err.message || 'Failed to toggle country', 'error');
|
|
|
|
|
- }
|
|
|
|
|
- } catch (err) {
|
|
|
|
|
- showToast('Error', err.message, 'error');
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
async function updateGeoCountry(code) {
|
|
async function updateGeoCountry(code) {
|
|
|
try {
|
|
try {
|