Skip to content

Commit

Permalink
feat(analytics): enforce POST -only route for retry returned enrollme…
Browse files Browse the repository at this point in the history
…nt event
  • Loading branch information
lalver1 committed Oct 1, 2024
1 parent d71d2ea commit 0ca7d95
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion benefits/in_person/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ def reenrollment_error(request):

def retry(request):
"""View handler for card verification failure."""
enrollment_analytics.returned_retry(request, enrollment_method=models.EnrollmentMethods.IN_PERSON)
# enforce POST-only route for sending analytics
if request.method == "POST":
enrollment_analytics.returned_retry(request, enrollment_method=models.EnrollmentMethods.IN_PERSON)

agency = session.agency(request)
context = {
**admin_site.each_context(request),
Expand Down

0 comments on commit 0ca7d95

Please sign in to comment.