Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/controller/server.go')
-rw-r--r--web/controller/server.go5
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