summaryrefslogtreecommitdiffstats
path: root/lib/Controller/ItemApiController.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Controller/ItemApiController.php')
-rw-r--r--lib/Controller/ItemApiController.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Controller/ItemApiController.php b/lib/Controller/ItemApiController.php
index 5f9da73a6..2e59d5b3a 100644
--- a/lib/Controller/ItemApiController.php
+++ b/lib/Controller/ItemApiController.php
@@ -94,6 +94,13 @@ class ItemApiController extends ApiController
);
break;
default:
+ // Fallback in case people try getRead here
+ if ($getRead === false && $type === ListType::ALL_ITEMS) {
+ $type = ListType::UNREAD;
+ } elseif ($getRead === false) {
+ return ['message' => 'Setting getRead on an already filtered list is not allowed!'];
+ }
+
$items = $this->itemService->findAllWithFilters(
$this->getUserId(),
$type,