Skip to content

Commit

Permalink
fix certificate deletion and vanity domain output
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid committed Feb 11, 2020
1 parent 287dbf6 commit 8acc858
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/Commands/CertDeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ protected function determineCertificate()
*/
protected function getCertificateForDomain(array $certificates, $domain)
{
$certificateId = collect($certificates)->firstWhere(
$certificate = collect($certificates)->firstWhere(
'domain', $domain
);

if (! $certificateId) {
if (! $certificate) {
Helpers::abort('You do not have any certificates matching the given criteria.');
}

return $certificateId;
return $certificate['id'];
}
}
18 changes: 10 additions & 8 deletions src/Commands/Output/DeploymentSuccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ public function render(Deployment $deployment, DateTimeInterface $startedAt)
$this->displayTargetDomains($deployment);
}

Helpers::line();
if ($deployment->vanityDomain()) {
Helpers::line();

Helpers::table([
'<comment>Deployment ID</comment>',
'<comment>Environment URL (Copied To Clipboard)</comment>'
], [[
"<bright>{$deployment->id}</>",
"<bright>https://{$deployment->vanityDomain()}</>",
]]);
Helpers::table([
'<comment>Deployment ID</comment>',
'<comment>Environment URL (Copied To Clipboard)</comment>'
], [[
"<bright>{$deployment->id}</>",
"<bright>https://{$deployment->vanityDomain()}</>",
]]);
}
}

/**
Expand Down

0 comments on commit 8acc858

Please sign in to comment.