change redirect to http 204

This commit is contained in:
Charles 2025-10-27 12:53:13 +01:00
parent 003ee40992
commit 36fe5f5588
1 changed files with 3 additions and 2 deletions

View File

@ -278,7 +278,7 @@ class UserController extends AbstractController
$this->entityManager->flush();
$this->actionService->createAction("Deactivate user in organization", $actingUser, $org, $org->getName() . " for user " . $user->getUserIdentifier());
return $this->redirectToRoute('user_index');
return new Response('', Response::HTTP_NO_CONTENT); //204
}
throw $this->createAccessDeniedException(self::ACCESS_DENIED);
@ -335,7 +335,8 @@ class UserController extends AbstractController
$this->entityManager->persist($user);
$this->entityManager->flush();
$this->actionService->createAction("Delete user", $actingUser, null, $user->getUserIdentifier());
return $this->redirectToRoute('user_index');
return new Response('', Response::HTTP_NO_CONTENT); //204
}
#[Route(path: '/application/roles/{id}', name: 'application_role', methods: ['GET', 'POST'])]