fix indentation

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2024-11-07 09:34:37 +01:00
parent e30b4562b2
commit 4a8e0c8415

View file

@ -851,26 +851,26 @@ readonly class DockerActionManager {
} }
if ($createNetwork) { if ($createNetwork) {
$url = $this->BuildApiUrl('networks/create'); $url = $this->BuildApiUrl('networks/create');
try { try {
$this->guzzleClient->request( $this->guzzleClient->request(
'POST', 'POST',
$url, $url,
[ [
'json' => [ 'json' => [
'Name' => $network, 'Name' => $network,
'CheckDuplicate' => true, 'CheckDuplicate' => true,
'Driver' => 'bridge', 'Driver' => 'bridge',
'Internal' => false, 'Internal' => false,
]
] ]
); ]
} catch (RequestException $e) { );
// 409 is undocumented and gets thrown if the network already exists. } catch (RequestException $e) {
if ($e->getCode() !== 409) { // 409 is undocumented and gets thrown if the network already exists.
throw new \Exception("Could not create the nextcloud-aio network: " . $e->getMessage()); if ($e->getCode() !== 409) {
} throw new \Exception("Could not create the nextcloud-aio network: " . $e->getMessage());
} }
}
} }
$url = $this->BuildApiUrl( $url = $this->BuildApiUrl(