From 97d109c900dffd8e2c567699a1bc989e2781c876 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 25 Apr 2023 16:48:18 +0200 Subject: [PATCH] [api] support for delete depleted clients --- web/controller/api.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/controller/api.go b/web/controller/api.go index 333c96e5..2134a792 100644 --- a/web/controller/api.go +++ b/web/controller/api.go @@ -23,12 +23,13 @@ func (a *APIController) initRouter(g *gin.RouterGroup) { g.POST("/add", a.addInbound) g.POST("/del/:id", a.delInbound) g.POST("/update/:id", a.updateInbound) - g.POST("/addClient/", a.addInboundClient) + g.POST("/addClient", a.addInboundClient) g.POST("/:id/delClient/:clientId", a.delInboundClient) g.POST("/updateClient/:clientId", a.updateInboundClient) g.POST("/:id/resetClientTraffic/:email", a.resetClientTraffic) g.POST("/resetAllTraffics", a.resetAllTraffics) g.POST("/resetAllClientTraffics/:id", a.resetAllClientTraffics) + g.POST("/delDepletedClients/:id", a.delDepletedClients) a.inboundController = NewInboundController(g) } @@ -69,3 +70,6 @@ func (a *APIController) resetAllTraffics(c *gin.Context) { func (a *APIController) resetAllClientTraffics(c *gin.Context) { a.inboundController.resetAllClientTraffics(c) } +func (a *APIController) delDepletedClients(c *gin.Context) { + a.inboundController.delDepletedClients(c) +}