Fix traffic update in db

This commit is contained in:
Alireza Ahmadi
2023-02-22 18:34:02 +01:00
parent ceb7a7ac14
commit 35e4b96e9e

View File

@@ -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,