diff --git a/compose/rest/request/automation.go b/compose/rest/request/automation.go index 90da26644..afdd20622 100644 --- a/compose/rest/request/automation.go +++ b/compose/rest/request/automation.go @@ -314,6 +314,18 @@ func (r *AutomationTriggerScript) Fill(req *http.Request) (err error) { return err } } + + if val, ok := req.MultipartForm.Value["args[]"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } else if val, ok := req.MultipartForm.Value["args"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } } } diff --git a/compose/rest/request/module.go b/compose/rest/request/module.go index 4a8924f3b..acfe84113 100644 --- a/compose/rest/request/module.go +++ b/compose/rest/request/module.go @@ -880,6 +880,18 @@ func (r *ModuleTriggerScript) Fill(req *http.Request) (err error) { return err } } + + if val, ok := req.MultipartForm.Value["args[]"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } else if val, ok := req.MultipartForm.Value["args"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } } } diff --git a/compose/rest/request/namespace.go b/compose/rest/request/namespace.go index e3fc19702..50d4882b8 100644 --- a/compose/rest/request/namespace.go +++ b/compose/rest/request/namespace.go @@ -1204,6 +1204,18 @@ func (r *NamespaceTriggerScript) Fill(req *http.Request) (err error) { return err } } + + if val, ok := req.MultipartForm.Value["args[]"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } else if val, ok := req.MultipartForm.Value["args"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } } } diff --git a/compose/rest/request/page.go b/compose/rest/request/page.go index 40c182cdb..cbabf1240 100644 --- a/compose/rest/request/page.go +++ b/compose/rest/request/page.go @@ -1337,6 +1337,18 @@ func (r *PageTriggerScript) Fill(req *http.Request) (err error) { return err } } + + if val, ok := req.MultipartForm.Value["args[]"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } else if val, ok := req.MultipartForm.Value["args"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } } } diff --git a/compose/rest/request/record.go b/compose/rest/request/record.go index c636bb4ed..138b36c00 100644 --- a/compose/rest/request/record.go +++ b/compose/rest/request/record.go @@ -1973,6 +1973,18 @@ func (r *RecordTriggerScriptOnList) Fill(req *http.Request) (err error) { return err } } + + if val, ok := req.MultipartForm.Value["args[]"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } else if val, ok := req.MultipartForm.Value["args"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } } } diff --git a/system/rest/request/application.go b/system/rest/request/application.go index 947c5edbb..b7094d03a 100644 --- a/system/rest/request/application.go +++ b/system/rest/request/application.go @@ -1107,6 +1107,18 @@ func (r *ApplicationTriggerScript) Fill(req *http.Request) (err error) { return err } } + + if val, ok := req.MultipartForm.Value["args[]"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } else if val, ok := req.MultipartForm.Value["args"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } } } diff --git a/system/rest/request/automation.go b/system/rest/request/automation.go index 90da26644..afdd20622 100644 --- a/system/rest/request/automation.go +++ b/system/rest/request/automation.go @@ -314,6 +314,18 @@ func (r *AutomationTriggerScript) Fill(req *http.Request) (err error) { return err } } + + if val, ok := req.MultipartForm.Value["args[]"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } else if val, ok := req.MultipartForm.Value["args"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } } } diff --git a/system/rest/request/role.go b/system/rest/request/role.go index fdaab6133..89572baf8 100644 --- a/system/rest/request/role.go +++ b/system/rest/request/role.go @@ -1228,6 +1228,18 @@ func (r *RoleTriggerScript) Fill(req *http.Request) (err error) { return err } } + + if val, ok := req.MultipartForm.Value["args[]"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } else if val, ok := req.MultipartForm.Value["args"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } } } diff --git a/system/rest/request/user.go b/system/rest/request/user.go index f657a0ae1..ab06f289c 100644 --- a/system/rest/request/user.go +++ b/system/rest/request/user.go @@ -1304,6 +1304,18 @@ func (r *UserTriggerScript) Fill(req *http.Request) (err error) { return err } } + + if val, ok := req.MultipartForm.Value["args[]"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } else if val, ok := req.MultipartForm.Value["args"]; ok { + r.Args, err = parseMapStringInterface(val) + if err != nil { + return err + } + } } }