mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-14 05:23:09 +00:00
Fix Trouble resetting traffic alireza0/x-ui#18
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
<a-icon type="edit"></a-icon>
|
||||
{{ i18n "edit" }}
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="dbInbound.clientStats.length>1" key="addClient">
|
||||
<a-menu-item v-if="dbInbound.isTrojan || dbInbound.isVLess || dbInbound.isVMess" key="addClient">
|
||||
<a-icon type="user"></a-icon>
|
||||
{{ i18n "pages.client.add"}}
|
||||
</a-menu-item>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user