【更新】更新restful

This commit is contained in:
PandaGoAdmin
2022-08-03 16:00:32 +08:00
parent 2cb23c0ecf
commit 6945277fdb
48 changed files with 1234 additions and 836 deletions

View File

@@ -1,16 +1,15 @@
package router
import (
"github.com/gin-gonic/gin"
"github.com/emicklei/go-restful/v3"
"pandax/apps/system/api"
)
func InitSystemRouter(router *gin.RouterGroup) {
func InitSystemRouter(container *restful.Container) {
s := &api.System{}
sys := router.Group("")
{
sys.GET("", s.ConnectWs)
sys.GET("server", s.ServerInfo)
}
ws := new(restful.WebService)
ws.Path("/system").Produces(restful.MIME_JSON)
ws.Route(ws.GET("/").To(s.ConnectWs))
ws.Route(ws.GET("/server").To(s.ServerInfo))
container.Add(ws)
}