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:
authorAndrew Smirnov <72158444+sandrew-uj@users.noreply.github.com>2026-04-19 22:37:34 +0300
committerGitHub <noreply@github.com>2026-04-19 22:37:34 +0300
commite986a133f80b6b1fb231887806f4853edd540d7b (patch)
treee1ef901abe2137a4cbe0d16596dc8cc820f8d903 /web/service
parent7466916e0206d55826d74f37c251bb5e40182c00 (diff)
Add new hourly reset traffic (#3966)
* Add new hourly reset traffic * fix
Diffstat (limited to 'web/service')
-rw-r--r--web/service/inbound.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/web/service/inbound.go b/web/service/inbound.go
index 8a3a4ae2..81f37389 100644
--- a/web/service/inbound.go
+++ b/web/service/inbound.go
@@ -1891,6 +1891,16 @@ func (s *InboundService) ResetAllTraffics() error {
return err
}
+func (s *InboundService) ResetInboundTraffic(id int) error {
+ db := database.GetDB()
+
+ result := db.Model(model.Inbound{}).
+ Where("id = ?", id).
+ Updates(map[string]any{"up": 0, "down": 0})
+
+ return result.Error
+}
+
func (s *InboundService) DelDepletedClients(id int) (err error) {
db := database.GetDB()
tx := db.Begin()