[feature] add getClientTraffics api

This commit is contained in:
Alireza Ahmadi
2023-04-20 19:16:06 +02:00
parent 4838b0f6f0
commit 11bff57f23
3 changed files with 14 additions and 1 deletions

View File

@@ -75,6 +75,15 @@ func (a *InboundController) getInbound(c *gin.Context) {
}
jsonObj(c, inbound, nil)
}
func (a *InboundController) getClientTraffics(c *gin.Context) {
email := c.Param("email")
clientTraffics, err := a.inboundService.GetClientTrafficByEmail(email)
if err != nil {
jsonMsg(c, "Error getting traffics", err)
return
}
jsonObj(c, clientTraffics, nil)
}
func (a *InboundController) addInbound(c *gin.Context) {
inbound := &model.Inbound{}