Add getClientTrafficsById (#1347)

* Add getClientTrafficsById
Ability for API to get traffics by uuid

* bugfix GetClientTrafficByID

* bugfix
GetClientTrafficByID

* Update
GetClientTrafficByID function by Alireza0 Recomendation

* update
Replace Logger Warning with Debug for GetClientTrafficByID

* Fix: return empty array instead of error in case of gorm.ErrRecordNotFound

---------

Co-authored-by: Ali Gilani <gilani1364@gmail.com>
This commit is contained in:
Hassan Ali Gilani
2024-07-14 03:08:30 -07:00
committed by GitHub
parent f6535dd83e
commit f5ce84ae68
4 changed files with 30 additions and 0 deletions

View File

@@ -232,6 +232,7 @@ docker build -t x-ui .
| `POST` | `"/:id/delClient/:clientId"` | Delete client by clientId\* |
| `POST` | `"/updateClient/:clientId"` | Update client by clientId\* |
| `GET` | `"/getClientTraffics/:email"` | Get client's traffic |
| `GET` | `"/getClientTrafficsById/:id"` | Get client's traffic By ID |
| `POST` | `"/:id/resetClientTraffic/:email"` | Reset client's traffic |
| `POST` | `"/resetAllTraffics"` | Reset traffics of all inbounds |
| `POST` | `"/resetAllClientTraffics/:id"` | Reset inbound clients traffics (-1: all) |