mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-29 10:56:35 +08:00
feat: 机器新增命令过滤配置、首页功能完善(操作记录与快捷操作)
This commit is contained in:
27
server/internal/machine/router/machine_cmd_conf.go
Normal file
27
server/internal/machine/router/machine_cmd_conf.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/machine/api"
|
||||
"mayfly-go/pkg/biz"
|
||||
"mayfly-go/pkg/ioc"
|
||||
"mayfly-go/pkg/req"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func InitMachineCmdConfRouter(router *gin.RouterGroup) {
|
||||
mccs := router.Group("machine/security/cmd-confs")
|
||||
|
||||
mcc := new(api.MachineCmdConf)
|
||||
biz.ErrIsNil(ioc.Inject(mcc))
|
||||
|
||||
reqs := [...]*req.Conf{
|
||||
req.NewGet("", mcc.MachineCmdConfs),
|
||||
|
||||
req.NewPost("", mcc.Save).Log(req.NewLogSave("机器命令配置-保存")).RequiredPermissionCode("cmdconf:save"),
|
||||
|
||||
req.NewDelete(":id", mcc.Delete).Log(req.NewLogSave("机器命令配置-删除")).RequiredPermissionCode("cmdconf:del"),
|
||||
}
|
||||
|
||||
req.BatchSetGroup(mccs, reqs[:])
|
||||
}
|
||||
Reference in New Issue
Block a user