Skip to content

Commit 4ed8881

Browse files
committed
Add next actions
1 parent d4705d0 commit 4ed8881

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Models/Servers/Servers.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ public function createInDatacenter(
125125
return APIResponse::create(array_merge([
126126
'action' => Action::parse($payload->action),
127127
'server' => Server::parse($payload->server),
128+
'next_actions' => collect($payload->next_actions)->map(function ($action) {
129+
return Action::parse($action);
130+
})->toArray(),
128131
], (property_exists($payload, 'root_password')) ? ['root_password' => $payload->root_password] : []
129132
), $response->getHeaders());
130133

@@ -176,6 +179,9 @@ public function createInLocation(string $name,
176179
return APIResponse::create(array_merge([
177180
'action' => Action::parse($payload->action),
178181
'server' => Server::parse($payload->server),
182+
'next_actions' => collect($payload->next_actions)->map(function ($action) {
183+
return Action::parse($action);
184+
})->toArray(),
179185
], (property_exists($payload, 'root_password')) ? ['root_password' => $payload->root_password] : []
180186
), $response->getHeaders());
181187

0 commit comments

Comments
 (0)