Skip to content

Commit 617f545

Browse files
committed
Fix Content Type
1 parent a524f0f commit 617f545

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Models/Servers/Servers.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,19 @@ public function get(int $serverId): Server
7474
public function create(
7575
string $name,
7676
ServerType $serverType,
77-
Datacenter $datacenter,
78-
Location $location,
7977
Image $image,
78+
Location $location = null,
79+
Datacenter $datacenter = null,
80+
$ssh_keys = [],
8081
$startAfterCreate = true,
81-
$user_data = '',
82-
$ssh_keys = []
82+
$user_data = ''
8383
): Server {
8484
$response = $this->httpClient->post('servers', [
8585
'json' => [
8686
'name' => $name,
8787
'server_type' => $serverType->id,
88-
'datacenter' => $datacenter->id,
89-
'location' => $location->id,
88+
'datacenter' => $datacenter->id ?: null,
89+
'location' => $location->id ?: null,
9090
'image' => $image->id,
9191
'start_after_create' => $startAfterCreate,
9292
'user_data' => $user_data,

0 commit comments

Comments
 (0)