Skip to content

Commit

Permalink
Use new up_vote CSRF name for upvoting/favourite
Browse files Browse the repository at this point in the history
  • Loading branch information
melroy89 authored Sep 16, 2024
1 parent 8ff44be commit 1e80362
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/components/favourite.html.twig
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<form method="post"
action="{{ path(formDest~'_favourite', {id: subject.id}) }}">
<input type="hidden" name="token" value="{{ csrf_token('favourite') }}">
<input type="hidden" name="token" value="{{ csrf_token('up_vote') }}">
<button class="{{ html_classes('stretched-link', {'active': app.user and subject.isFavored(app.user) }) }}"
type="submit"
data-action="subject#favourite">
{{ 'favourites'|trans }} <span class="{{ html_classes({'hidden': not subject.favouriteCount}) }}">
(<span data-subject-target="favCounter">{{ subject.favouriteCount }}</span>)
</span>
</button>
</form>
</form>

0 comments on commit 1e80362

Please sign in to comment.