diff options
| author | Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> | 2023-05-14 00:11:18 +0300 |
|---|---|---|
| committer | Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> | 2023-05-14 00:11:18 +0300 |
| commit | b5ae580d12b31a8a0db44894aab149870e23ef45 (patch) | |
| tree | 18fe0b6f1283a1f230bdf9659c96c6bd737a1f6e /web/controller/api.go | |
| parent | 63939244a4ebc63567a11444c9ad045b3b83b3b3 (diff) | |
Update '/xui/API' to new path '/panel/api'
Diffstat (limited to 'web/controller/api.go')
| -rw-r--r-- | web/controller/api.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/web/controller/api.go b/web/controller/api.go index 333d4f36..607dd83a 100644 --- a/web/controller/api.go +++ b/web/controller/api.go @@ -14,7 +14,7 @@ func NewAPIController(g *gin.RouterGroup) *APIController { } func (a *APIController) initRouter(g *gin.RouterGroup) { - g = g.Group("/xui/API/inbounds") + g = g.Group("/panel/api/inbounds") g.Use(a.checkLogin) g.GET("/list", a.getAllInbounds) @@ -35,21 +35,27 @@ func (a *APIController) initRouter(g *gin.RouterGroup) { a.inboundController = NewInboundController(g) } + func (a *APIController) getAllInbounds(c *gin.Context) { a.inboundController.getInbounds(c) } + func (a *APIController) getSingleInbound(c *gin.Context) { a.inboundController.getInbound(c) } + func (a *APIController) getClientTraffics(c *gin.Context) { a.inboundController.getClientTraffics(c) } + func (a *APIController) addInbound(c *gin.Context) { a.inboundController.addInbound(c) } + func (a *APIController) delInbound(c *gin.Context) { a.inboundController.delInbound(c) } + func (a *APIController) updateInbound(c *gin.Context) { a.inboundController.updateInbound(c) } @@ -61,24 +67,31 @@ func (a *APIController) getClientIps(c *gin.Context) { func (a *APIController) clearClientIps(c *gin.Context) { a.inboundController.clearClientIps(c) } + func (a *APIController) addInboundClient(c *gin.Context) { a.inboundController.addInboundClient(c) } + func (a *APIController) delInboundClient(c *gin.Context) { a.inboundController.delInboundClient(c) } + func (a *APIController) updateInboundClient(c *gin.Context) { a.inboundController.updateInboundClient(c) } + func (a *APIController) resetClientTraffic(c *gin.Context) { a.inboundController.resetClientTraffic(c) } + func (a *APIController) resetAllTraffics(c *gin.Context) { a.inboundController.resetAllTraffics(c) } + func (a *APIController) resetAllClientTraffics(c *gin.Context) { a.inboundController.resetAllClientTraffics(c) } + func (a *APIController) delDepletedClients(c *gin.Context) { a.inboundController.delDepletedClients(c) } |
