changed endpoint for check availability to pass domain as parameter; wrote unit test for extra dot validation in form

This commit is contained in:
David Kennedy 2023-12-05 11:09:09 -05:00
parent 1c836576e5
commit 5811448450
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
4 changed files with 22 additions and 2 deletions

View file

@ -82,6 +82,7 @@ def available(request, domain=""):
Response is a JSON dictionary with the key "available" and value true or
false.
"""
domain = request.GET.get('domain', '')
DraftDomain = apps.get_model("registrar.DraftDomain")
# validate that the given domain could be a domain name and fail early if
# not.