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:
authorSaeid <43953720+surbiks@users.noreply.github.com>2024-01-29 23:37:20 +0300
committerGitHub <noreply@github.com>2024-01-29 23:37:20 +0300
commit6c0775b12055e4546cb0fd86e1d8d569d886eefa (patch)
tree8f7ee64e54f83f9c563a178c4afaee10e072eddc /web/service/inbound.go
parent9fbaede59f87dd9d8b77479a3fb295c3c882630e (diff)
Show outbound traffic in outbounds table (#1711)
* store outbound traffic in database * show outbound traffic in outbounds table * add refresh button
Diffstat (limited to 'web/service/inbound.go')
-rw-r--r--web/service/inbound.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/service/inbound.go b/web/service/inbound.go
index f3445101..291c0dee 100644
--- a/web/service/inbound.go
+++ b/web/service/inbound.go
@@ -682,7 +682,7 @@ func (s *InboundService) UpdateInboundClient(data *model.Inbound, clientId strin
return needRestart, tx.Save(oldInbound).Error
}
-func (s *InboundService) AddTraffic(inboundTraffics []*xray.Traffic, clientTraffics []*xray.ClientTraffic) (error, bool) {
+func (s *InboundService) AddTraffic(traffics []*xray.Traffic, clientTraffics []*xray.ClientTraffic) (error, bool) {
var err error
db := database.GetDB()
tx := db.Begin()
@@ -694,7 +694,7 @@ func (s *InboundService) AddTraffic(inboundTraffics []*xray.Traffic, clientTraff
tx.Commit()
}
}()
- err = s.addInboundTraffic(tx, inboundTraffics)
+ err = s.addInboundTraffic(tx, traffics)
if err != nil {
return err, false
}