const execption
This commit is contained in:
parent
798ca4ba07
commit
b54fe41795
|
|
@ -16,6 +16,7 @@ use Symfony\Component\Routing\Attribute\Route;
|
|||
#[Route(path: '/user', name: 'user_')]
|
||||
class UserController extends AbstractController
|
||||
{
|
||||
private const NOT_FOUND = 'User not found';
|
||||
public function __construct(
|
||||
private readonly UserOrganizationService $userOrganizationService,
|
||||
private readonly EntityManagerInterface $entityManager,
|
||||
|
|
@ -171,7 +172,7 @@ class UserController extends AbstractController
|
|||
$user->setIsActive(false);
|
||||
$entityManager->persist($user);
|
||||
$entityManager->flush();
|
||||
return $this->redirectToRoute('user_dashboard');
|
||||
return $this->redirectToRoute('user_index');
|
||||
}
|
||||
return new Response('Unauthorized', Response::HTTP_UNAUTHORIZED);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue