mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-02-07 13:25:37 +08:00
feat: 新增系统操作日志&其他优化
This commit is contained in:
@@ -22,7 +22,7 @@ func InitMachineScriptRouter(router *gin.RouterGroup) {
|
||||
ctx.NewReqCtxWithGin(c).Handle(ms.MachineScripts)
|
||||
})
|
||||
|
||||
saveMachienScriptLog := ctx.NewLogInfo("保存脚本")
|
||||
saveMachienScriptLog := ctx.NewLogInfo("保存脚本").WithSave(true)
|
||||
smsP := ctx.NewPermission("machine:script:save")
|
||||
// 保存脚本
|
||||
machines.POST(":machineId/scripts", func(c *gin.Context) {
|
||||
@@ -31,7 +31,7 @@ func InitMachineScriptRouter(router *gin.RouterGroup) {
|
||||
Handle(ms.SaveMachineScript)
|
||||
})
|
||||
|
||||
deleteLog := ctx.NewLogInfo("删除脚本")
|
||||
deleteLog := ctx.NewLogInfo("删除脚本").WithSave(true)
|
||||
dP := ctx.NewPermission("machine:script:del")
|
||||
// 保存脚本
|
||||
machines.DELETE(":machineId/scripts/:scriptId", func(c *gin.Context) {
|
||||
@@ -40,7 +40,7 @@ func InitMachineScriptRouter(router *gin.RouterGroup) {
|
||||
Handle(ms.DeleteMachineScript)
|
||||
})
|
||||
|
||||
runLog := ctx.NewLogInfo("执行机器脚本")
|
||||
runLog := ctx.NewLogInfo("执行机器脚本").WithSave(true)
|
||||
rP := ctx.NewPermission("machine:script:run")
|
||||
// 运行脚本
|
||||
machines.GET(":machineId/scripts/:scriptId/run", func(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user