1Panel/core/router/command.go
ssongliu 37df602ae8
Some checks failed
sync2gitee / repo-sync (push) Failing after -8m3s
feat: 提取分组及快速命令功能 (#6169)
2024-08-19 10:04:43 +00:00

21 lines
602 B
Go

package router
import (
v2 "github.com/1Panel-dev/1Panel/core/app/api/v2"
"github.com/gin-gonic/gin"
)
type CommandRouter struct{}
func (s *CommandRouter) InitRouter(Router *gin.RouterGroup) {
commandRouter := Router.Group("commands")
baseApi := v2.ApiGroupApp.BaseApi
{
commandRouter.POST("/list", baseApi.ListCommand)
commandRouter.POST("", baseApi.CreateCommand)
commandRouter.POST("/del", baseApi.DeleteCommand)
commandRouter.POST("/search", baseApi.SearchCommand)
commandRouter.POST("/tree", baseApi.SearchCommandTree)
commandRouter.POST("/update", baseApi.UpdateCommand)
}
}