diff --git a/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsGetEndpoint.php b/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsGetEndpoint.php index 658439bd6e..cd1d06b2ee 100644 --- a/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsGetEndpoint.php +++ b/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsGetEndpoint.php @@ -34,6 +34,10 @@ class WorkflowsGetEndpoint extends Endpoint { 'created_at' => $workflow->getCreatedAt()->format(DateTimeImmutable::W3C), 'updated_at' => $workflow->getUpdatedAt()->format(DateTimeImmutable::W3C), 'activated_at' => $workflow->getActivatedAt() ? $workflow->getActivatedAt()->format(DateTimeImmutable::W3C) : null, + 'author' => [ + 'id' => $workflow->getAuthor()->ID, + 'name' => $workflow->getAuthor()->display_name, + ], ]; } } diff --git a/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsPutEndpoint.php b/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsPutEndpoint.php index 46996f5844..de415971b9 100644 --- a/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsPutEndpoint.php +++ b/mailpoet/lib/Automation/Engine/Endpoints/Workflows/WorkflowsPutEndpoint.php @@ -53,6 +53,10 @@ class WorkflowsPutEndpoint extends Endpoint { 'created_at' => $workflow->getCreatedAt()->format(DateTimeImmutable::W3C), 'updated_at' => $workflow->getUpdatedAt()->format(DateTimeImmutable::W3C), 'activated_at' => $workflow->getActivatedAt() ? $workflow->getActivatedAt()->format(DateTimeImmutable::W3C) : null, + 'author' => [ + 'id' => $workflow->getAuthor()->ID, + 'name' => $workflow->getAuthor()->display_name, + ], 'steps' => array_map(function (Step $step) { return [ 'id' => $step->getId(),