diff --git a/src/Controller/MarkAllReadController.php b/src/Controller/MarkAllReadController.php new file mode 100644 index 0000000..ece0497 --- /dev/null +++ b/src/Controller/MarkAllReadController.php @@ -0,0 +1,31 @@ +getUser(); + + $this->notificationRepository->markAllReadByUser($user); + + return new Response(null, Response::HTTP_NO_CONTENT); + } +} diff --git a/src/Controller/NotificationUnreadCountController.php b/src/Controller/NotificationUnreadCountController.php new file mode 100644 index 0000000..dc3669f --- /dev/null +++ b/src/Controller/NotificationUnreadCountController.php @@ -0,0 +1,31 @@ +getUser(); + + $count = $this->notificationRepository->countUnreadByUser($user); + + return new JsonResponse(['count' => $count]); + } +}