Removed dead code
This commit is contained in:
parent
d089815069
commit
42bee789ba
|
|
@ -20,7 +20,7 @@ class MercureController extends AbstractController
|
|||
public function getMercureToken(Request $request): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
|
||||
$user = $this->userService->getUserByIdentifier($this->getUser()->getUserIdentifier());
|
||||
$user =$this->getUser();
|
||||
|
||||
$domain = $request->getSchemeAndHttpHost();
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class NotificationController extends AbstractController
|
|||
public function index(): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_SUPER_ADMIN');
|
||||
$user = $this->userService->getUserByIdentifier($this->getUser()->getUserIdentifier());
|
||||
$user =$this->getUser();
|
||||
|
||||
$notifications = $this->notificationRepository->findRecentByUser($user, 50);
|
||||
$unreadCount = $this->notificationRepository->countUnreadByUser($user);
|
||||
|
|
@ -44,7 +44,7 @@ class NotificationController extends AbstractController
|
|||
public function unread(): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
|
||||
$user = $this->userService->getUserByIdentifier($this->getUser()->getUserIdentifier());
|
||||
$user =$this->getUser();
|
||||
|
||||
$notifications = $this->notificationRepository->findUnreadByUser($user);
|
||||
$unreadCount = count($notifications);
|
||||
|
|
@ -59,7 +59,7 @@ class NotificationController extends AbstractController
|
|||
public function count(): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
|
||||
$user = $this->userService->getUserByIdentifier($this->getUser()->getUserIdentifier());
|
||||
$user =$this->getUser();
|
||||
|
||||
$unreadCount = $this->notificationRepository->countUnreadByUser($user);
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ class NotificationController extends AbstractController
|
|||
public function markAsRead(int $id): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
|
||||
$user = $this->userService->getUserByIdentifier($this->getUser()->getUserIdentifier());
|
||||
$user =$this->getUser();
|
||||
|
||||
$notification = $this->notificationRepository->find($id);
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ class NotificationController extends AbstractController
|
|||
public function markAllAsRead(): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
|
||||
$user = $this->userService->getUserByIdentifier($this->getUser()->getUserIdentifier());
|
||||
$user =$this->getUser();
|
||||
|
||||
$count = $this->notificationRepository->markAllAsReadForUser($user);
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ class NotificationController extends AbstractController
|
|||
public function delete(int $id): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
|
||||
$user = $this->userService->getUserByIdentifier($this->getUser()->getUserIdentifier());
|
||||
$user =$this->getUser();
|
||||
|
||||
$notification = $this->notificationRepository->find($id);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue