Add author property to Workflow endpoints

[MAILPOET-4417]
This commit is contained in:
David Remer
2022-08-10 12:39:28 +03:00
committed by Veljko V
parent ffc7773a6a
commit dce1b1403c
2 changed files with 8 additions and 0 deletions

View File

@@ -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,
],
];
}
}