Files
PandaX/apps/system/router/system.go
2023-04-07 17:02:58 +08:00

16 lines
350 B
Go

package router
import (
"github.com/emicklei/go-restful/v3"
"pandax/apps/system/api"
)
func InitSystemRouter(container *restful.Container) {
s := &api.System{}
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)
}