Fix wish accesses

This commit is contained in:
Jannis Portmann 2022-01-19 22:40:11 +01:00
parent f54f663fb0
commit 71ca261cab
2 changed files with 2 additions and 1 deletions

View file

@ -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();

View file

@ -28,7 +28,7 @@
{% for wish in wishes %}
<li class="list-group-item d-flex justify-content-between align-items-center"> {{ wish.title }}
<span>
<a href="{{ path('delete_wish', {'urlId': wish.id}) }}" class="btn btn-danger" aria-label="Delete"><i class="fas fa-trash-alt" aria-hidden="true" title="Delete"></i></a>
<a href="{{ path('delete_wish', {'urlId': wish.urlid}) }}" class="btn btn-danger" aria-label="Delete"><i class="fas fa-trash-alt" aria-hidden="true" title="Delete"></i></a>
</span>
</li>
{% endfor %}