8889841cwp-content/plugins/mailpoet/lib/Automation/Engine/Endpoints/Automations/AutomationsPutEndpoint.php000064400000002636150476753070035534 0ustar00home/clixcotz/tcchp.clix.co.tzupdateController = $updateController; $this->automationMapper = $automationMapper; } public function handle(Request $request): Response { $data = $request->getParams(); $automation = $this->updateController->updateAutomation(intval($request->getParam('id')), $data); return new Response($this->automationMapper->buildAutomation($automation)); } public static function getRequestSchema(): array { return [ 'id' => Builder::integer()->required(), 'name' => Builder::string()->minLength(1), 'status' => Builder::string(), 'steps' => AutomationSchema::getStepsSchema(), 'meta' => Builder::object(), ]; } }