Skip to content

Commit

Permalink
Little cosmetic cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmith4-godaddy committed Nov 7, 2024
1 parent a6c1b50 commit 1ea5502
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/API/Accounts/AccountsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function removeCollaboratorFromAcct(string $accessToken, int $acctId, int
->delete("accounts/{$acctId}/collaborators/{$collabId}/{$role}/{$appId}");
}

// this is named createSshPublicKey in the upstream mgmt-client codebase
// this is named createSshPublicKey in upstream mgmt-client
public function addSshKey(
string $accessToken,
int $accountId,
Expand Down
8 changes: 4 additions & 4 deletions src/Command/Accounts/AddCollabToAcctCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@ public function configure()
->addArgument('email', InputArgument::REQUIRED, 'Email address')
->addArgument('accountId', InputArgument::REQUIRED, 'Account ID')
->addArgument('roleId', InputArgument::REQUIRED, 'Role')
->addOption('appId', null, InputOption::VALUE_OPTIONAL, 'App ID (acct-level if omitted)', 0)
->addOption('displayName', null, InputOption::VALUE_OPTIONAL, 'Display Name', 0)
->addOption('app', null, InputOption::VALUE_OPTIONAL, 'App ID (acct-level if omitted)', 0)
->addOption('displayname', null, InputOption::VALUE_OPTIONAL, 'Display Name', 0)
;
$this->addOauthOptions();
}

public function execute(InputInterface $input, OutputInterface $output): int
{
$newAcctEmail = $input->getArgument('email');
$newAcctName = $input->getArgument('displayName');
$newAcctName = $input->getArgument('displayname');
if ($newAcctName === 0) { $newAcctName = $input->getArgument('email'); }
$newAcctId = $input->getArgument('accountId');
$newAcctRole = $this->roleToInt($input->getArgument('roleId'));
if ($newAcctRole === false) {
$output->writeln ("Invalid role, must be one of 'app-only-minimal', 'app-only', 'billing', 'tech', 'sub-admin', 'super-admin', 'owner'");
return Command::FAILURE;
}
$newAppId = $input->getArgument('appId');
$newAppId = $input->getArgument('app');
$token = $this->token->token;

$r = $this->api->addCollaboratorToAcct($token,
Expand Down

0 comments on commit 1ea5502

Please sign in to comment.