diff --git a/web/html/inbounds.html b/web/html/inbounds.html index 0f55c6c9..450a778c 100644 --- a/web/html/inbounds.html +++ b/web/html/inbounds.html @@ -1164,24 +1164,25 @@ if (!msg.success) { return; } - with (msg.obj) { - this.expireDiff = expireDiff * 86400000; - this.trafficDiff = trafficDiff * 1073741824; - this.defaultCert = defaultCert; - this.defaultKey = defaultKey; - this.tgBotEnable = tgBotEnable; - this.subSettings = { - enable: subEnable, - subTitle: subTitle, - subURI: subURI, - subJsonURI: subJsonURI, - subJsonEnable: subJsonEnable, - }; - this.pageSize = pageSize; - this.remarkModel = remarkModel; - this.datepicker = datepicker; - this.ipLimitEnable = ipLimitEnable; - } + const { expireDiff, trafficDiff, defaultCert, defaultKey, tgBotEnable, + subEnable, subTitle, subURI, subJsonURI, subJsonEnable, + pageSize, remarkModel, datepicker, ipLimitEnable } = msg.obj; + this.expireDiff = expireDiff * 86400000; + this.trafficDiff = trafficDiff * 1073741824; + this.defaultCert = defaultCert; + this.defaultKey = defaultKey; + this.tgBotEnable = tgBotEnable; + this.subSettings = { + enable: subEnable, + subTitle: subTitle, + subURI: subURI, + subJsonURI: subJsonURI, + subJsonEnable: subJsonEnable, + }; + this.pageSize = pageSize; + this.remarkModel = remarkModel; + this.datepicker = datepicker; + this.ipLimitEnable = ipLimitEnable; }, applyShareQuotaPooling(dbInbounds) { // For every client that opted into shareQuota and has a subId, replace diff --git a/web/service/inbound.go b/web/service/inbound.go index 3f764f3f..0860aed4 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -835,7 +835,7 @@ func (s *InboundService) writeBackClientSubID(sourceInboundID int, sourceProtoco } settingsBytes, err := json.Marshal(map[string][]model.Client{ - "clients": []model.Client{client}, + "clients": {client}, }) if err != nil { return false, err