diff options
| author | MHSanaei <33454419+MHSanaei@users.noreply.github.com> | 2023-03-24 16:43:31 +0300 |
|---|---|---|
| committer | MHSanaei <33454419+MHSanaei@users.noreply.github.com> | 2023-03-24 16:43:31 +0300 |
| commit | 826c7264b5cbea4e4149645bef220fd3c6a010e7 (patch) | |
| tree | d877a02ce05a813cb9ae4f4eb9f7b0838cdafcb1 /web/controller/server.go | |
| parent | 162349f8c83dd07eba6bc4786b225a8fe6f65b24 (diff) | |
Add version and log
TGBOT: Add xray config to backup
[TGBOT] add seach inbound
Diffstat (limited to 'web/controller/server.go')
| -rw-r--r-- | web/controller/server.go | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/web/controller/server.go b/web/controller/server.go index 7b7239d5..673a96d8 100644 --- a/web/controller/server.go +++ b/web/controller/server.go @@ -1,11 +1,10 @@ package controller import ( + "github.com/gin-gonic/gin" "time" "x-ui/web/global" "x-ui/web/service" - - "github.com/gin-gonic/gin" ) type ServerController struct { @@ -38,7 +37,6 @@ func (a *ServerController) initRouter(g *gin.RouterGroup) { g.POST("/stopXrayService", a.stopXrayService) g.POST("/restartXrayService", a.restartXrayService) g.POST("/installXray/:version", a.installXray) - g.POST("/logs", a.getLogs) } func (a *ServerController) refreshStatus() { @@ -89,13 +87,13 @@ func (a *ServerController) installXray(c *gin.Context) { } func (a *ServerController) stopXrayService(c *gin.Context) { - a.lastGetStatusTime = time.Now() + a.lastGetStatusTime = time.Now() err := a.serverService.StopXrayService() if err != nil { jsonMsg(c, "", err) return } - jsonMsg(c, "Xray stoped", err) + jsonMsg(c, "Xray stoped",err) } func (a *ServerController) restartXrayService(c *gin.Context) { @@ -104,15 +102,6 @@ func (a *ServerController) restartXrayService(c *gin.Context) { jsonMsg(c, "", err) return } - jsonMsg(c, "Xray restarted", err) - -} + jsonMsg(c, "Xray restarted",err) -func (a *ServerController) getLogs(c *gin.Context) { - logs, err := a.serverService.GetLogs() - if err != nil { - jsonMsg(c, I18n(c, "getLogs"), err) - return - } - jsonObj(c, logs, nil) -} +}
\ No newline at end of file |
