Opcion de enviar update a los servicios externos
This commit is contained in:
@ -10,9 +10,21 @@ use Incoviba\Common\Alias;
|
||||
)]
|
||||
class ExternalServices extends Alias\Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->addOption('update', 'u', Console\Input\InputOption::VALUE_NONE, 'Update');
|
||||
}
|
||||
|
||||
public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output): int
|
||||
{
|
||||
$update = $input->getOption('update');
|
||||
|
||||
$url = '/api/external/services/check';
|
||||
|
||||
if ($update) {
|
||||
$url = '/api/external/services/update';
|
||||
}
|
||||
|
||||
$output->writeln("GET {$url}");
|
||||
$response = $this->client->get($url);
|
||||
$output->writeln("Response Code: {$response->getStatusCode()}");
|
||||
|
Reference in New Issue
Block a user