Extend AutomationPutEndpoint to receive meta data

[MAILPOET-4966]
This commit is contained in:
David Remer
2023-02-15 12:19:54 +02:00
committed by Aschepikov
parent 0d888ce8e4
commit 2d709b6249
2 changed files with 8 additions and 0 deletions

View File

@@ -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);