Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-06-14 19:20:19 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-06-14 19:20:19 +0300
commitd40e61fc454a9c42d2ac69950074bf3504d484bf (patch)
treefdbc6f122ad99a078698c82205520c15167b8242 /web/html/xui/client_modal.html
parentc0f1a926e588303051a6a3e977ed2948e6dfd764 (diff)
fix and improve
Diffstat (limited to 'web/html/xui/client_modal.html')
-rw-r--r--web/html/xui/client_modal.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html
index e8236778..a2d29417 100644
--- a/web/html/xui/client_modal.html
+++ b/web/html/xui/client_modal.html
@@ -124,12 +124,14 @@
try {
const msg = await HttpUtil.post(`/panel/inbound/clientIps/${email}`);
if (!msg.success) {
+ document.getElementById("clientIPs").value = msg.obj;
return;
}
- const ips = JSON.parse(msg.obj).join(",\n");
+ const ips = Array.isArray(msg.obj) ? msg.obj.join(",\n") : msg.obj;
document.getElementById("clientIPs").value = ips;
} catch (error) {
- document.getElementById("clientIPs").value = msg.obj;
+ console.error(error);
+ document.getElementById("clientIPs").value = 'An error occurred while making the request';
}
},
async clearDBClientIps(email) {