From ceb7a7ac14530b6b2f8920bfbd0e03cff750fc4c Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Wed, 22 Feb 2023 15:58:01 +0100 Subject: [PATCH] Fix Trouble resetting traffic alireza0/x-ui#18 --- web/html/xui/inbounds.html | 2 +- web/service/inbound.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index e27edc10..c6f1bb2a 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -65,7 +65,7 @@ {{ i18n "edit" }} - + {{ i18n "pages.client.add"}} diff --git a/web/service/inbound.go b/web/service/inbound.go index c9859f86..bc48b6e6 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -466,7 +466,7 @@ func (s *InboundService) ResetClientTraffic(clientEmail string) error { result := db.Model(xray.ClientTraffic{}). Where("email = ?", clientEmail). - Updates(map[string]interface{}{"up": 0, "down": 0}) + Updates(map[string]interface{}{"enable": true, "up": 0, "down": 0}) err := result.Error