Skip to content

Commit

Permalink
Merge pull request #36 from nens/csrf_test_100
Browse files Browse the repository at this point in the history
removed csrf decorators from viesws
  • Loading branch information
JJFlorian authored Apr 5, 2024
2 parents a219c70 + df7b0e3 commit 3525bb2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions api/views.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from django.contrib.auth import logout
from django.contrib.auth.models import User
from django.shortcuts import redirect
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import generics, permissions, status, views, viewsets
from rest_framework.decorators import action
Expand Down Expand Up @@ -47,6 +45,7 @@ def get(self, request, format=None):
"monitoringtubes": reverse(
"api:gmw:monitoringtube-list", request=request, format=format
),
"version": "1",
}
return Response(data)

Expand Down Expand Up @@ -138,7 +137,6 @@ def get(self, request, *args, **kwargs):
"""List of all Import Tasks."""
return self.list(request, *args, **kwargs)

@method_decorator(csrf_exempt)
def post(self, request):
"""
Initialize an import task by posting a BRO object.
Expand Down Expand Up @@ -227,7 +225,6 @@ def get(self, request, *args, **kwargs):
"""List of all Upload Tasks."""
return self.list(request, *args, **kwargs)

@method_decorator(csrf_exempt)
def post(self, request):
"""
Initialize an upload task by posting the bro_domain, registration_type, request_type, and the sourcedocument_data
Expand Down

0 comments on commit 3525bb2

Please sign in to comment.