From 37aea2ca302a411d818dbc557413547a24b7b8a4 Mon Sep 17 00:00:00 2001 From: Moreau Elise <moreau.elise13@gmail.com> Date: Sun, 11 Oct 2020 15:41:23 +0200 Subject: [PATCH] redirection instead render --- src/Application/Actions/Group/CreateGroupAction.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Application/Actions/Group/CreateGroupAction.php b/src/Application/Actions/Group/CreateGroupAction.php index df76955..c43bcbd 100755 --- a/src/Application/Actions/Group/CreateGroupAction.php +++ b/src/Application/Actions/Group/CreateGroupAction.php @@ -41,7 +41,9 @@ class CreateGroupAction extends GroupAction $this->logger->info("Group has been created."); - return $this->twig->render($this->response, "/group/group_view.twig", ["group" => $group, "session" => $_SESSION]); + return $this->response + ->withHeader('Location', '/groups' . $groupId) + ->withStatus(302); } } -- GitLab