Skip to content

Commit

Permalink
Merge pull request #1034 from mozilla/fix-email-post-json-response
Browse files Browse the repository at this point in the history
Fix /email POST JSON response
  • Loading branch information
groovecoder authored Aug 24, 2021
2 parents 6d12966 + 034648b commit 2dd0f60
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions emails/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,11 @@ def _index_POST(request):
return redirect('profile')

if settings.SITE_ORIGIN not in request.headers.get('Origin', ''):
address_string = '%s@%s' % (
relay_address.address, relay_from_domain(request)['RELAY_DOMAIN']
)
return JsonResponse({
'id': relay_address.id,
'address': address_string,
'address': relay_address.full_address,
'domain': relay_address.domain_value,
'full_address': relay_addres.full_address
'local_portion': relay_address.address
}, status=201)

return redirect('profile')
Expand Down

0 comments on commit 2dd0f60

Please sign in to comment.