From 35e4b96e9e6a5101e6c162f8909003b1894c838b Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Wed, 22 Feb 2023 18:34:02 +0100 Subject: [PATCH] Fix traffic update in db --- web/service/inbound.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/service/inbound.go b/web/service/inbound.go index bc48b6e6..db9686e7 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -384,7 +384,7 @@ func (s *InboundService) AddClientTraffic(traffics []*xray.ClientTraffic) (err e traffic.Total = client.TotalGB } } - if tx.Where("inbound_id = ?, email = ?", inbound.Id, traffic.Email). + if tx.Where("inbound_id = ? and email = ?", inbound.Id, traffic.Email). UpdateColumns(map[string]interface{}{ "enable": true, "expiry_time": traffic.ExpiryTime,