Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed csrf decorators from viesws #36

Merged
merged 3 commits into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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