Add activated_at property to workflow endpoints
[MAILPOET-4417]
This commit is contained in:
@ -33,6 +33,7 @@ class WorkflowsGetEndpoint extends Endpoint {
|
|||||||
'status' => $workflow->getStatus(),
|
'status' => $workflow->getStatus(),
|
||||||
'created_at' => $workflow->getCreatedAt()->format(DateTimeImmutable::W3C),
|
'created_at' => $workflow->getCreatedAt()->format(DateTimeImmutable::W3C),
|
||||||
'updated_at' => $workflow->getUpdatedAt()->format(DateTimeImmutable::W3C),
|
'updated_at' => $workflow->getUpdatedAt()->format(DateTimeImmutable::W3C),
|
||||||
|
'activated_at' => $workflow->getActivatedAt() ? $workflow->getActivatedAt()->format(DateTimeImmutable::W3C) : null,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@ class WorkflowsPutEndpoint extends Endpoint {
|
|||||||
'status' => $workflow->getStatus(),
|
'status' => $workflow->getStatus(),
|
||||||
'created_at' => $workflow->getCreatedAt()->format(DateTimeImmutable::W3C),
|
'created_at' => $workflow->getCreatedAt()->format(DateTimeImmutable::W3C),
|
||||||
'updated_at' => $workflow->getUpdatedAt()->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) {
|
'steps' => array_map(function (Step $step) {
|
||||||
return [
|
return [
|
||||||
'id' => $step->getId(),
|
'id' => $step->getId(),
|
||||||
|
Reference in New Issue
Block a user