Throw exception if domain used to call Certificates.get() does not have a certificate, fixes #722
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -110,6 +110,9 @@ class Certificates extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
||||
$result = Database::pexecute_first($stmt, array(
|
||||
"domainid" => $domainid
|
||||
));
|
||||
if (! $result) {
|
||||
throw new \Exception("Domain '" . $domain['domain'] . "' does not have a certificate.", 404);
|
||||
}
|
||||
return $this->response(200, "successfull", $result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user