online users backend #1286

This commit is contained in:
Alireza Ahmadi
2023-12-04 19:13:21 +01:00
parent 8dc23f97b6
commit f734c821d6
4 changed files with 34 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ func (a *InboundController) initRouter(g *gin.RouterGroup) {
g.POST("/resetAllTraffics", a.resetAllTraffics)
g.POST("/resetAllClientTraffics/:id", a.resetAllClientTraffics)
g.POST("/delDepletedClients/:id", a.delDepletedClients)
g.POST("/onlines", a.onlines)
}
func (a *InboundController) getInbounds(c *gin.Context) {
@@ -278,3 +279,7 @@ func (a *InboundController) delDepletedClients(c *gin.Context) {
}
jsonMsg(c, "All delpeted clients are deleted", nil)
}
func (a *InboundController) onlines(c *gin.Context) {
jsonObj(c, a.inboundService.GetOnlineClinets(), nil)
}