Skip to content

Commit 609b86f

Browse files
Updated the logic for the bootstrapSingleServer command.
1 parent 59be39e commit 609b86f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

module/Client/src/Client/Controller/ApiController.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,16 @@ public function bootstrapSingleServerAction($args)
7979

8080
$response = $this->sendApiRequest($args);
8181
$data = $response->responseData->bootstrap;
82-
$content = '';
83-
if (sprintf('%s', $data->success) == "true") {
84-
$name = sprintf("%s", $data->apiKey->name);
85-
$key = sprintf("%s", $data->apiKey->hash);
86-
}
82+
$name = sprintf("%s", $data->apiKey->name);
83+
$key = sprintf("%s", $data->apiKey->hash);
8784

8885
if (isset($args['simple-output'])) {
8986
$response = new Response();
9087
$response->setContent("$name\n$key\n");
9188
}
9289

9390
$wait = $this->params('wait');
94-
if ($wait) {
91+
if ($wait && sprintf('%s', $data->success) != "true") {
9592
$keyService = $this->getServiceLocator()->get('defaultApiKey');
9693
$keyService->setName($name);
9794
$keyService->setKey($key);

0 commit comments

Comments
 (0)