diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-04-09 22:43:18 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-04-09 22:43:18 +0300 |
| commit | e1da43053d23c995bcd6e7267cb20042398cd64f (patch) | |
| tree | 08c4c371ba070ef765ec2be83270ee6032e54774 /web/controller/server.go | |
| parent | 3bb90cbf2463b31c6a921f7cd75cf32edd3a37f0 (diff) | |
alireza update pack
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/controller/server.go')
| -rw-r--r-- | web/controller/server.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/web/controller/server.go b/web/controller/server.go index 7b7239d5..43a1fadc 100644 --- a/web/controller/server.go +++ b/web/controller/server.go @@ -38,7 +38,7 @@ 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) + g.POST("/logs/:count", a.getLogs) } func (a *ServerController) refreshStatus() { @@ -109,7 +109,8 @@ func (a *ServerController) restartXrayService(c *gin.Context) { } func (a *ServerController) getLogs(c *gin.Context) { - logs, err := a.serverService.GetLogs() + count := c.Param("count") + logs, err := a.serverService.GetLogs(count) if err != nil { jsonMsg(c, I18n(c, "getLogs"), err) return |
