summaryrefslogtreecommitdiffstats
path: root/apps/files_reminders/lib
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-08-14 18:07:03 -0700
committerChristopher Ng <chrng8@gmail.com>2023-08-14 18:07:03 -0700
commit6d2292fe1db049b8c5baf05933ed058be426f5a5 (patch)
treee53aa4d8b39b54df61633da3c97c4039a33467a6 /apps/files_reminders/lib
parent0d3297db28d49d603a3e8b7b0482efc046ff6a00 (diff)
downloadnextcloud-server-6d2292fe1db049b8c5baf05933ed058be426f5a5.tar.gz
nextcloud-server-6d2292fe1db049b8c5baf05933ed058be426f5a5.zip
fix(files_reminders): Always respect json output option
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files_reminders/lib')
-rw-r--r--apps/files_reminders/lib/Command/ListCommand.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_reminders/lib/Command/ListCommand.php b/apps/files_reminders/lib/Command/ListCommand.php
index 3f3ce13b857..f9113e15605 100644
--- a/apps/files_reminders/lib/Command/ListCommand.php
+++ b/apps/files_reminders/lib/Command/ListCommand.php
@@ -77,10 +77,6 @@ class ListCommand extends Base {
}
$reminders = $this->reminderService->getAll($user ?? null);
- if (empty($reminders)) {
- $io->text('No reminders');
- return 0;
- }
$outputOption = $input->getOption('output');
switch ($outputOption) {
@@ -97,6 +93,11 @@ class ListCommand extends Base {
);
return 0;
default:
+ if (empty($reminders)) {
+ $io->text('No reminders');
+ return 0;
+ }
+
$io->table(
['User Id', 'File Id', 'Path', 'Due Date', 'Updated At', 'Created At', 'Notified'],
array_map(