From 71ca261cab8b170e8236df8d32a2ac383b97e7d5 Mon Sep 17 00:00:00 2001 From: thisfro Date: Wed, 19 Jan 2022 22:40:11 +0100 Subject: [PATCH] Fix wish accesses --- src/Controller/UserController.php | 1 + templates/user/wish.html.twig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index 688e480..d74c96e 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -95,6 +95,7 @@ class UserController extends AbstractController if ($form->isSubmitted() && $form->isValid()) { $wish->setByUser($user); + $wish->setUrlId(uniqid()); $this->entityManager->persist($wish); $this->entityManager->flush(); diff --git a/templates/user/wish.html.twig b/templates/user/wish.html.twig index 1f9e93d..5b01cc6 100644 --- a/templates/user/wish.html.twig +++ b/templates/user/wish.html.twig @@ -28,7 +28,7 @@ {% for wish in wishes %}
  • {{ wish.title }} - +
  • {% endfor %}