Ensured API key name appears in the proper color in the console, for disabled or expired API keys

This commit is contained in:
Alejandro Celaya 2021-03-14 10:20:05 +01:00
parent 221b62ea57
commit 4ce44034cb

View file

@ -57,8 +57,7 @@ class ListKeysCommand extends BaseCommand
$messagePattern = $this->determineMessagePattern($apiKey); $messagePattern = $this->determineMessagePattern($apiKey);
// Set columns for this row // Set columns for this row
$rowData = [sprintf($messagePattern, $apiKey)]; $rowData = [sprintf($messagePattern, $apiKey), sprintf($messagePattern, $apiKey->name() ?? '-')];
$rowData[] = $apiKey->name() ?? '-';
if (! $enabledOnly) { if (! $enabledOnly) {
$rowData[] = sprintf($messagePattern, $this->getEnabledSymbol($apiKey)); $rowData[] = sprintf($messagePattern, $this->getEnabledSymbol($apiKey));
} }