Skip to content

Commit fd94249

Browse files
committed
IBX-9060: Fixed loadNotifications
1 parent 814c348 commit fd94249

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/bundle/Controller/NotificationController.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ public function getNotificationsAction(Request $request, int $offset, int $limit
6464
$response = new JsonResponse();
6565

6666
try {
67-
$notificationList = $this->notificationService->loadNotifications($offset, $limit);
67+
$notificationList = $this->notificationService->loadNotifications(
68+
new NotificationQuery([], $offset, $limit)
69+
);
6870
$response->setData([
6971
'pending' => $this->notificationService->getPendingNotificationCount(),
7072
'total' => $notificationList->totalCount,
@@ -275,7 +277,9 @@ public function markAllNotificationsAsReadAction(Request $request): JsonResponse
275277
$response = new JsonResponse();
276278

277279
try {
278-
$notifications = $this->notificationService->loadNotifications(0, PHP_INT_MAX)->items;
280+
$notifications = $this->notificationService->loadNotifications(
281+
new NotificationQuery([], 0, PHP_INT_MAX)
282+
)->items;
279283

280284
foreach ($notifications as $notification) {
281285
$this->notificationService->markNotificationAsRead($notification);

0 commit comments

Comments
 (0)