diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 0fd3a8b..483d3af 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -54,7 +54,7 @@ final class ApiController extends Controller ->where('seenAt', null) ->where('createdAt', $now, '<') // Don't show pre-created notifications ->sort('createdAt', OrderType::ASC) - ->execute(); + ->executeGetArray(); foreach ($notifications as $notification) { $new = clone $notification; @@ -88,7 +88,7 @@ final class ApiController extends Controller ->where('createdAt', $now, '<') // Don't show pre-created notifications ->where('createdAt', $request->getDataDateTime('start') ?? $now->modify('-1 hour'), '>') ->sort('createdAt', OrderType::ASC) - ->execute(); + ->executeGetArray(); $response->header->set('Content-Type', MimeType::M_JSON . '; charset=utf-8', true); $response->data[$request->uri->__toString()] = [ diff --git a/Controller/BackendController.php b/Controller/BackendController.php index f0d28b1..d2db847 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -56,7 +56,7 @@ final class BackendController extends Controller implements DashboardElementInte ->where('seenAt', null) ->where('createdAt', new \DateTime('now'), '<') // Don't show future notifications ->sort('createdAt', OrderType::ASC) - ->execute(); + ->executeGetArray(); return $view; } @@ -76,7 +76,7 @@ final class BackendController extends Controller implements DashboardElementInte ->where('createdAt', new \DateTime('now'), '<') // Don't show future notifications ->sort('createdAt', OrderType::ASC) ->limit(5) - ->execute(); + ->executeGetArray(); return $view; }