From bfd709afdf92ba27a93727f4336c80a5282540b7 Mon Sep 17 00:00:00 2001 From: Daniel Guzman Date: Sun, 11 Aug 2024 03:07:31 +0200 Subject: [PATCH] Fix --- .../User/Handlers/getRelationships/HandleGetRelationships.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Service/User/Handlers/getRelationships/HandleGetRelationships.php b/src/Service/User/Handlers/getRelationships/HandleGetRelationships.php index f8686c3d..ba658a22 100644 --- a/src/Service/User/Handlers/getRelationships/HandleGetRelationships.php +++ b/src/Service/User/Handlers/getRelationships/HandleGetRelationships.php @@ -3,6 +3,7 @@ namespace DMD\LaLigaApi\Service\User\Handlers\getRelationships; use DMD\LaLigaApi\Dto\UserDto; +use DMD\LaLigaApi\Entity\CustomRole; use DMD\LaLigaApi\Entity\User; use DMD\LaLigaApi\Repository\UserRepository; use Symfony\Bundle\SecurityBundle\Security; @@ -24,7 +25,7 @@ class HandleGetRelationships { throw new HttpException(Response::HTTP_NOT_FOUND, 'User not found'); } - $customRoles = $user->getRoles(); + $customRoles = $user->getCustomRoles(); if (empty($customRoles)) { return new JsonResponse([