mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 16:00:25 +08:00
feat: message notify
This commit is contained in:
@@ -71,7 +71,9 @@ func (m *MachineScript) RunMachineScript(rc *req.Ctx) {
|
||||
script := ms.Script
|
||||
// 如果有脚本参数,则用脚本参数替换脚本中的模板占位符参数
|
||||
if params := rc.Query("params"); params != "" {
|
||||
script, err = stringx.TemplateParse(ms.Script, jsonx.ToMap(params))
|
||||
p, err := jsonx.ToMap(params)
|
||||
biz.ErrIsNil(err)
|
||||
script, err = stringx.TemplateParse(ms.Script, p)
|
||||
biz.ErrIsNilAppendErr(err, "failed to parse the script template parameter: %s")
|
||||
}
|
||||
cli, err := m.machineApp.GetCliByAc(ac)
|
||||
|
||||
Reference in New Issue
Block a user