From cc3ff61ae215bdaec0c1ae0c3ee232156015c6b4 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Tue, 25 Apr 2023 14:38:35 +0330 Subject: update by client id Co-Authored-By: Alireza Ahmadi --- web/html/xui/inbounds.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web/html/xui/inbounds.html') diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 0aeba067..14849873 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -561,9 +561,9 @@ okText: '{{ i18n "pages.client.submitEdit"}}', dbInbound: dbInbound, index: index, - confirm: async (client, dbInboundId, index) => { + confirm: async (client, dbInboundId, clientId) => { clientModal.loading(); - await this.updateClient(client, dbInboundId, index); + await this.updateClient(client, dbInboundId, clientId); clientModal.close(); }, isEdit: true @@ -580,12 +580,12 @@ }; await this.submit(`/xui/inbound/addClient`, data); }, - async updateClient(client, dbInboundId, index) { + async updateClient(client, dbInboundId, clientId) { const data = { id: dbInboundId, settings: '{"clients": [' + client.toString() +']}', }; - await this.submit(`/xui/inbound/updateClient/${index}`, data); + await this.submit(`/xui/inbound/updateClient/${clientId}`, data); }, resetTraffic(dbInboundId) { dbInbound = this.dbInbounds.find(row => row.id === dbInboundId); -- cgit v1.2.3