diff --git a/web/controller/xui.go b/web/controller/xui.go index 47e91a46..d1bde624 100644 --- a/web/controller/xui.go +++ b/web/controller/xui.go @@ -1,6 +1,8 @@ package controller import ( + "x-ui/web/service" + "github.com/gin-gonic/gin" ) @@ -11,6 +13,7 @@ type XUIController struct { serverController *ServerController settingController *SettingController xraySettingController *XraySettingController + serverService service.ServerService } func NewXUIController(g *gin.RouterGroup) *XUIController { @@ -30,7 +33,7 @@ func (a *XUIController) initRouter(g *gin.RouterGroup) { g.GET("/navigation", a.navigation) a.inboundController = NewInboundController(g) - a.serverController = NewServerController(g) + a.serverController = NewServerController(g, a.serverService) a.settingController = NewSettingController(g) a.xraySettingController = NewXraySettingController(g) }