Add activated_at property to workflow endpoints

[MAILPOET-4417]
This commit is contained in:
David Remer
2022-08-10 12:28:19 +03:00
committed by Veljko V
parent 5bd994c01c
commit 4bdec5165d
2 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class WorkflowsGetEndpoint extends Endpoint {
'status' => $workflow->getStatus(),
'created_at' => $workflow->getCreatedAt()->format(DateTimeImmutable::W3C),
'updated_at' => $workflow->getUpdatedAt()->format(DateTimeImmutable::W3C),
'activated_at' => $workflow->getActivatedAt() ? $workflow->getActivatedAt()->format(DateTimeImmutable::W3C) : null,
];
}
}

View File

@ -52,6 +52,7 @@ class WorkflowsPutEndpoint extends Endpoint {
'status' => $workflow->getStatus(),
'created_at' => $workflow->getCreatedAt()->format(DateTimeImmutable::W3C),
'updated_at' => $workflow->getUpdatedAt()->format(DateTimeImmutable::W3C),
'activated_at' => $workflow->getActivatedAt() ? $workflow->getActivatedAt()->format(DateTimeImmutable::W3C) : null,
'steps' => array_map(function (Step $step) {
return [
'id' => $step->getId(),