mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-17 18:09:25 +02:00
Initial /avilable API view and tests
This commit is contained in:
parent
5c105f1861
commit
01553a4d91
6 changed files with 58 additions and 0 deletions
15
src/api/views.py
Normal file
15
src/api/views.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
"""Internal API views"""
|
||||
|
||||
from django.views.decorators.http import require_http_methods
|
||||
from django.http import JsonResponse
|
||||
|
||||
@require_http_methods(["GET"])
|
||||
def available(request, domain=""):
|
||||
|
||||
"""Is a given domain available or not.
|
||||
|
||||
Response is a JSON dictionary with the key "available" and value true or
|
||||
false.
|
||||
"""
|
||||
return JsonResponse({"available": False})
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue