From 6db9bd0ad9cef15abeae397af7b1836713a27015 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 25 Apr 2023 13:38:26 +0200 Subject: [PATCH] fix switch enable disable client --- web/html/xui/inbounds.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index ec79e159..3236e389 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -678,7 +678,8 @@ clients = this.getClients(dbInbound.protocol, inbound.settings); index = this.findIndexOfClient(clients, client); clients[index].enable = !clients[index].enable; - await this.updateClient(clients[index],dbInboundId, index); + clientId = dbInbound.protocol == "trojan" ? clients[index].password : clients[index].id; + await this.updateClient(clients[index],dbInboundId, clientId); this.loading(false); }, async submit(url, data) {