Skip to content

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.

remove socket-port function

LinkLeongd350c3e96fc3
diff --git a/model/sys_common.go b/model/sys_common.go
index 6e56e25..859c2b4 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 0fd234b..a947d95 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 e2476c8..8ee6f07 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