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.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/controller/server.go b/web/controller/server.go
index 8a7a2198..dd001f5e 100644
--- a/web/controller/server.go
+++ b/web/controller/server.go
@@ -46,6 +46,7 @@ func (a *ServerController) initRouter(g *gin.RouterGroup) {
g.POST("/installXray/:version", a.installXray)
g.POST("/updateGeofile/:fileName", a.updateGeofile)
g.POST("/logs/:count", a.getLogs)
+ g.POST("/xraylogs/:count", a.getXrayLogs)
g.POST("/getConfigJson", a.getConfigJson)
g.GET("/getDb", a.getDb)
g.POST("/importDB", a.importDB)
@@ -134,6 +135,12 @@ func (a *ServerController) getLogs(c *gin.Context) {
jsonObj(c, logs, nil)
}
+func (a *ServerController) getXrayLogs(c *gin.Context) {
+ count := c.Param("count")
+ logs := a.serverService.GetXrayLogs(count)
+ jsonObj(c, logs, nil)
+}
+
func (a *ServerController) getConfigJson(c *gin.Context) {
configJson, err := a.serverService.GetConfigJson()
if err != nil {