From d350c3e96fc395b2463a29db89d99cf10917b83c Mon Sep 17 00:00:00 2001 From: LinkLeong Date: Thu, 22 Dec 2022 03:53:55 +0000 Subject: [PATCH] remove socket-port function --- model/sys_common.go | 1 - route/route.go | 1 - route/v1/system.go | 16 ---------------- 3 files changed, 18 deletions(-) diff --git a/model/sys_common.go b/model/sys_common.go index 6e56e251e..859c2b41e 100644 --- a/model/sys_common.go +++ b/model/sys_common.go @@ -25,7 +25,6 @@ type ServerModel struct { LockAccount bool Token string USBAutoMount string - SocketPort string UpdateUrl string } diff --git a/route/route.go b/route/route.go index 0fd234b38..a947d95c8 100644 --- a/route/route.go +++ b/route/route.go @@ -49,7 +49,6 @@ func InitRouter() *gin.Engine { // r.GET("/v1/guide/check", v1.GetGuideCheck) // /v1/sys/guide_check r.GET("/v1/sys/debug", v1.GetSystemConfigDebug) // //debug - r.GET("/v1/sys/socket-port", v1.GetSystemSocketPort) //sys/socket_port r.GET("/v1/sys/version/check", v1.GetSystemCheckVersion) r.GET("/ping", func(ctx *gin.Context) { ctx.String(200, "pong") diff --git a/route/v1/system.go b/route/v1/system.go index e2476c8fa..8ee6f07c2 100644 --- a/route/v1/system.go +++ b/route/v1/system.go @@ -235,22 +235,6 @@ func GetSystemUtilization(c *gin.Context) { c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: data}) } -// @Summary Get notification port -// @Produce application/json -// @Accept application/json -// @Tags sys -// @Security ApiKeyAuth -// @Success 200 {string} string "ok" -// @Router /sys/socket/port [get] -func GetSystemSocketPort(c *gin.Context) { - c.JSON(common_err.SUCCESS, - model.Result{ - Success: common_err.SUCCESS, - Message: common_err.GetMsg(common_err.SUCCESS), - Data: config.ServerInfo.SocketPort, // @tiger 这里最好封装成 {'port': ...} 的形式,来体现出参的上下文 - }) -} - // @Summary get cpu info // @Produce application/json // @Accept application/json