Skip to content

Commit

Permalink
order books
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioMendolia committed Oct 14, 2023
1 parent 9621208 commit a2f2927
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Command/BooksTagCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(private BookSuggestions $bookSuggestions, private Bo
protected function configure(): void
{
$this
->addOption('allow-google', 'f', InputOption::VALUE_NONE, 'Force the extraction of the cover')
->addOption('allow-google', 'g', InputOption::VALUE_NONE, 'Force the extraction of the cover')
->addArgument('book-id', InputOption::VALUE_REQUIRED, 'Which book to extract the cover from, use "all" for all books')
;
}
Expand All @@ -41,7 +41,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$allowGoogle = $input->getOption('allow-google');

if ($bookId === 'all') {
$books = $this->bookRepository->findAll();
$books = $this->bookRepository->findBy([], ['updated' => 'ASC']);
} else {
$books = $this->bookRepository->findBy(['id' => $bookId]);
}
Expand Down

0 comments on commit a2f2927

Please sign in to comment.