Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-07-23 12:28:28 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-07-23 12:28:28 +0300
commitc7906e85980c45fd3f37d11b80e14a1075d94d4f (patch)
treeb9c20633175fc4592d8695553d78d8f18bf49d72 /web/controller/inbound.go
parente1bc43da5f1f06ea00bd28923b37b5d029522359 (diff)
API - Get client's traffic By ID
Co-Authored-By: Hassan Ali Gilani <mr.ajaxian@gmail.com>
Diffstat (limited to 'web/controller/inbound.go')
-rw-r--r--web/controller/inbound.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/web/controller/inbound.go b/web/controller/inbound.go
index cc34d1d8..c22ce192 100644
--- a/web/controller/inbound.go
+++ b/web/controller/inbound.go
@@ -77,6 +77,16 @@ func (a *InboundController) getClientTraffics(c *gin.Context) {
jsonObj(c, clientTraffics, nil)
}
+func (a *InboundController) getClientTrafficsById(c *gin.Context) {
+ id := c.Param("id")
+ clientTraffics, err := a.inboundService.GetClientTrafficByID(id)
+ if err != nil {
+ jsonMsg(c, "Error getting traffics", err)
+ return
+ }
+ jsonObj(c, clientTraffics, nil)
+}
+
func (a *InboundController) addInbound(c *gin.Context) {
inbound := &model.Inbound{}
err := c.ShouldBind(inbound)