Skip to content

Commit

Permalink
Set the protection after the upload because not available when uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
dagio committed Aug 16, 2016
1 parent 6bb8ec3 commit 6f8ca77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/API/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ public function upload($appFilePath, $platform, $publicKey = null, $protectedByA
'name' => 'platform',
'contents' => $platform,
],
[
'name' => 'protectedByAccount',
'contents' => (bool)$protectedByAccount,
],
[
'name' => 'file',
'contents' => fopen($appFilePath, 'r'),
Expand All @@ -74,6 +70,10 @@ public function upload($appFilePath, $platform, $publicKey = null, $protectedByA
throw new \Exception('Missing public key in response');
}

if ($protectedByAccount) {
$this->protectBuild($responseData['publicKey']);
}

$apiResponse = new UploadResponse($responseData['publicKey'], $responseData['appURL']);

// Set environment variable
Expand Down

0 comments on commit 6f8ca77

Please sign in to comment.