You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2020/09/10 21:56:20 UTC
[airavata-django-portal] 04/04: AIRAVATA-3346 Add missing allowed
http methods
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch AIRAVATA-3346-implement-remote-fs-abstraction-of-user-storage
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 5c9ba70267df8882dbfc6263d916c10f6af5c7dc
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Sep 10 13:58:36 2020 -0400
AIRAVATA-3346 Add missing allowed http methods
---
django_airavata/apps/api/views.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/django_airavata/apps/api/views.py b/django_airavata/apps/api/views.py
index 1469246..13224ff 100644
--- a/django_airavata/apps/api/views.py
+++ b/django_airavata/apps/api/views.py
@@ -940,7 +940,7 @@ class DataProductView(APIView):
return Response(serializer.data)
-@api_view()
+@api_view(http_method_names=['POST'])
def upload_input_file(request):
try:
input_file = request.FILES['file']
@@ -957,7 +957,7 @@ def upload_input_file(request):
return resp
-@api_view()
+@api_view(http_method_names=['POST'])
def tus_upload_finish(request):
uploadURL = request.POST['uploadURL']
@@ -1007,7 +1007,7 @@ def download_file(request):
raise Http404(str(e)) from e
-@api_view()
+@api_view(http_method_names=['DELETE'])
def delete_file(request):
# TODO check that user has write access to this file using sharing API
data_product_uri = request.GET.get('data-product-uri', '')