Skip to content

Commit

Permalink
Subdomain feedback return bad request on GET
Browse files Browse the repository at this point in the history
  • Loading branch information
neoformit committed Jul 24, 2023
1 parent 03fd64d commit 447f6df
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions webapp/home/api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""API endpoints."""

import json
from django.core.exceptions import SuspiciousOperation
from django.http import JsonResponse, HttpResponse, HttpResponseBadRequest

from .forms import SupportRequestForm
Expand Down Expand Up @@ -33,7 +32,7 @@ def dismiss_notice(request):
def subdomain_feedback(request, subdomain):
"""Process feedback form for *.usegalaxy.org.au subsites."""
if request.method != 'POST':
raise SuspiciousOperation
return HttpResponseBadRequest()
form = SupportRequestForm(request.POST)
if form.is_valid():
form.dispatch(subject=f"{subdomain.title()} subdomain feedback")
Expand Down

0 comments on commit 447f6df

Please sign in to comment.