mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-03-01 01:20:49 +03:00
bug fix - get client ips
This commit is contained in:
parent
04cf250a54
commit
2dec7f48f5
@ -260,6 +260,23 @@
|
|||||||
|
|
||||||
return generatedEmails;
|
return generatedEmails;
|
||||||
},
|
},
|
||||||
|
async getDBClientIps(email) {
|
||||||
|
const msg = await HttpUtil.post(`/panel/inbound/clientIps/${email}`);
|
||||||
|
if (!msg.success) {
|
||||||
|
document.getElementById("clientIPs").value = msg.obj;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let ips = msg.obj;
|
||||||
|
if (typeof ips === 'string' && ips.startsWith('[') && ips.endsWith(']')) {
|
||||||
|
try {
|
||||||
|
ips = JSON.parse(ips);
|
||||||
|
ips = Array.isArray(ips) ? ips.join("\n") : ips;
|
||||||
|
} catch (e) {
|
||||||
|
console.error('Error parsing JSON:', e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
document.getElementById("clientIPs").value = ips;
|
||||||
|
},
|
||||||
async clearDBClientIps(email) {
|
async clearDBClientIps(email) {
|
||||||
try {
|
try {
|
||||||
const msg = await HttpUtil.post(`/panel/inbound/clearClientIps/${email}`);
|
const msg = await HttpUtil.post(`/panel/inbound/clearClientIps/${email}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user