Fix wish accesses
This commit is contained in:
parent
f54f663fb0
commit
71ca261cab
2 changed files with 2 additions and 1 deletions
|
@ -95,6 +95,7 @@ class UserController extends AbstractController
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
$wish->setByUser($user);
|
$wish->setByUser($user);
|
||||||
|
$wish->setUrlId(uniqid());
|
||||||
|
|
||||||
$this->entityManager->persist($wish);
|
$this->entityManager->persist($wish);
|
||||||
$this->entityManager->flush();
|
$this->entityManager->flush();
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
{% for wish in wishes %}
|
{% for wish in wishes %}
|
||||||
<li class="list-group-item d-flex justify-content-between align-items-center"> {{ wish.title }}
|
<li class="list-group-item d-flex justify-content-between align-items-center"> {{ wish.title }}
|
||||||
<span>
|
<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>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Reference in a new issue