fix: Adapt reset of the update methods to use the new archived flag

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2024-02-22 17:44:51 +01:00
parent 32e3100e83
commit c2bb58b579
4 changed files with 17 additions and 7 deletions

View File

@ -44,7 +44,8 @@ class RenameTable extends Command {
protected function configure(): void {
$this
->setName('tables:rename')
->setName('tables:update')
->setAliases('tables:rename')
->setDescription('Rename a table.')
->addArgument(
'ID',
@ -62,6 +63,12 @@ class RenameTable extends Command {
InputOption::VALUE_OPTIONAL,
'New emoji.'
)
->addOption(
'archived',
'a',
InputOption::VALUE_NONE,
'Archived'
)
;
}
@ -74,9 +81,10 @@ class RenameTable extends Command {
$id = $input->getArgument('ID');
$title = $input->getArgument('title');
$emoji = $input->getOption('emoji');
$archived = $input->getOption('archived');
try {
$table = $this->tableService->update($id, $title, $emoji, '');
$table = $this->tableService->update($id, $title, $emoji, $archived, '');
$arr = $table->jsonSerialize();
unset($arr['hasShares']);