Skip to content

Commit c17b869

Browse files
authored
Merge pull request #124 from laravel/fix/deployments-without-teams-failing
Fixes getting zones from other teams to verify if dns changed
2 parents 9f808e2 + cdae3c4 commit c17b869

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Commands/Output/DeploymentSuccess.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function displayDnsRecordsChanges(Deployment $deployment)
6262

6363
$vapor = Helpers::app(ConsoleVaporClient::class);
6464

65-
collect($vapor->zones())->filter(function ($zone) use ($deployment) {
65+
collect($vapor->zones($deployment->project['team_id']))->filter(function ($zone) use ($deployment) {
6666
return in_array($zone['zone'], $deployment->root_domains);
6767
})->filter(function ($zone) use ($vapor) {
6868
return collect($vapor->records($zone['id']))->contains(function ($record) {

src/ConsoleVaporClient.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,15 @@ public function deleteProvider($providerId)
208208
/**
209209
* Get the zones that belong to the account.
210210
*
211+
* @param int $teamId
212+
*
211213
* @return array
212214
*/
213-
public function zones()
215+
public function zones($teamId = null)
214216
{
215-
return $this->request('get', '/api/teams/'.Helpers::config('team').'/zones');
217+
$teamId = $teamId ?: Helpers::config('team');
218+
219+
return $this->request('get', '/api/teams/'.$teamId.'/zones');
216220
}
217221

218222
/**

0 commit comments

Comments
 (0)