mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Added option to define domain to GenerateShortUrlCommand
This commit is contained in:
@@ -84,6 +84,12 @@ class GenerateShortUrlCommand extends Command
|
||||
'f',
|
||||
InputOption::VALUE_NONE,
|
||||
'This will force existing matching URL to be returned if found, instead of creating a new one.'
|
||||
)
|
||||
->addOption(
|
||||
'domain',
|
||||
'd',
|
||||
InputOption::VALUE_REQUIRED,
|
||||
'The domain to which this short URL will be attached.'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -124,7 +130,8 @@ class GenerateShortUrlCommand extends Command
|
||||
$this->getOptionalDate($input, 'validUntil'),
|
||||
$customSlug,
|
||||
$maxVisits !== null ? (int) $maxVisits : null,
|
||||
$input->getOption('findIfExists')
|
||||
$input->getOption('findIfExists'),
|
||||
$input->getOption('domain')
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user