Skip to content

Commit

Permalink
remove socket-port function
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong committed Dec 22, 2022
1 parent ec0d986 commit d350c3e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion model/sys_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ type ServerModel struct {
LockAccount bool
Token string
USBAutoMount string
SocketPort string
UpdateUrl string
}

Expand Down
1 change: 0 additions & 1 deletion route/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
16 changes: 0 additions & 16 deletions route/v1/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d350c3e

Please sign in to comment.