fix error in wait function
This commit is contained in:
+3
-2
@@ -315,7 +315,7 @@ function updateHerokuapp($HerokuappId, $apikey, $source)
|
||||
$data = json_encode($tmp);
|
||||
$response = HerokuAPI('POST', 'https://api.heroku.com/apps/' . $HerokuappId . '/builds', $data, $apikey);
|
||||
$result = json_decode( $response['body'], true );
|
||||
$result['status'] = $result['id'];
|
||||
$result['DplStatus'] = $result['id'];
|
||||
$response['body'] = json_encode($result);
|
||||
return $response;
|
||||
}
|
||||
@@ -345,8 +345,9 @@ function setConfigResponse($response)
|
||||
return json_decode( $response['body'], true );
|
||||
}
|
||||
|
||||
function WaitFunction($buildId) {
|
||||
function WaitFunction($buildId = '') {
|
||||
// GET /apps/{app_id_or_name}/builds/{build_id}
|
||||
if ($buildId=='1') return true;
|
||||
$response = HerokuAPI('GET', 'https://api.heroku.com/apps/' . getConfig('HerokuappId') . '/builds/' . $buildId, '', getConfig('APIKey'));
|
||||
if ($response['stat']==200) {
|
||||
$result = json_decode($response['body'], true);
|
||||
|
||||
Reference in New Issue
Block a user