Extend AutomationPutEndpoint to receive meta data
[MAILPOET-4966]
This commit is contained in:
@@ -66,6 +66,13 @@ class UpdateAutomationController {
|
||||
}
|
||||
}
|
||||
|
||||
$automation->deleteMetas();
|
||||
if (array_key_exists('meta', $data)) {
|
||||
foreach ($data['meta'] as $key => $value) {
|
||||
$automation->setMeta($key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
$this->hooks->doAutomationBeforeSave($automation);
|
||||
|
||||
$this->automationValidator->validate($automation);
|
||||
|
@@ -37,6 +37,7 @@ class AutomationsPutEndpoint extends Endpoint {
|
||||
'name' => Builder::string()->minLength(1),
|
||||
'status' => Builder::string(),
|
||||
'steps' => AutomationSchema::getStepsSchema(),
|
||||
'meta' => Builder::object(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user